diff --git a/lib/Collection.php b/lib/Collection.php index 66e7d9ce..5931ab24 100644 --- a/lib/Collection.php +++ b/lib/Collection.php @@ -60,7 +60,7 @@ class Collection{ } if($this->Type !== null && ($this->Type != CollectionType::Series && $this->Type != CollectionType::Set)){ - $error->Add(new Exceptions\InvalidCollectionTypeException($this->Type)); + $error->Add(new Exceptions\InvalidCollectionTypeException($this->Type->value)); } if($error->HasExceptions){ diff --git a/www/collections/get.php b/www/collections/get.php index 5d7a808c..9b443b39 100644 --- a/www/collections/get.php +++ b/www/collections/get.php @@ -23,7 +23,7 @@ try{ } $collectionName = preg_replace('/^The /ius', '', $collectionObject->Name); - $collectionType = $collectionObject->Type ?? 'collection'; + $collectionType = $collectionObject->Type->value ?? 'collection'; $pageTitle = 'Browse free ebooks in the ' . Formatter::EscapeHtml($collectionName) . ' ' . $collectionType; $pageDescription = 'A list of free ebooks in the ' . Formatter::EscapeHtml($collectionName) . ' ' . $collectionType; diff --git a/www/ebooks/ebook.php b/www/ebooks/ebook.php index af489a2e..3a33378b 100644 --- a/www/ebooks/ebook.php +++ b/www/ebooks/ebook.php @@ -129,8 +129,8 @@ catch(Exceptions\EbookNotFoundException){ SequenceNumber; ?>

in thePart of the Name)) ?> Type !== null){ ?> - Name), mb_strtolower($collection->Type), -strlen(mb_strtolower($collection->Type))) !== 0){ ?> - Type ?>. + Name), mb_strtolower($collection->Type->value), -strlen(mb_strtolower($collection->Type->value))) !== 0){ ?> + Type->value ?>. collection.