canihavesomecoffee / theTVDbAPI

PHP implementation for the 2nd version of the TheTVDb API
ISC License
11 stars 8 forks source link

The type of the "banner" attribute for class "CanIHaveSomeCoffee\TheTVDbAPI\Model\BasicSeries" must be one of "string" ("NULL" given) #10

Closed ghost closed 4 years ago

ghost commented 4 years ago

I've been getting these over the past few days. Did something in the TVDB API change? I didn't make any changes to my code.

[2020-01-28 11:25:51] REMOVED.ERROR: The type of the "banner" attribute for class "CanIHaveSomeCoffee\TheTVDbAPI\Model\BasicSeries" must be one of "string" ("NULL" given). {"exception":"[object] (Symfony\\Component\\Serializer\\Exception\\NotNormalizableValueException(code: 0): The type of the \"banner\" attribute for class \"CanIHaveSomeCoffee\\TheTVDbAPI\\Model\\BasicSeries\" must be one of \"string\" (\"NULL\" given). at /var/www/REMOVED/vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php:299)
[stacktrace]
#0 /var/www/REMOVED/vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php(197): Symfony\\Component\\Serializer\\Normalizer\\AbstractObjectNormalizer->validateAndDenormalize('CanIHaveSomeCof...', 'banner', NULL, NULL, Array)
#1 /var/www/REMOVED/vendor/symfony/serializer/Serializer.php(182): Symfony\\Component\\Serializer\\Normalizer\\AbstractObjectNormalizer->denormalize(Array, 'CanIHaveSomeCof...', NULL, Array)
#2 /var/www/REMOVED/vendor/canihavesomecoffee/thetvdbapi/src/DataParser.php(64): Symfony\\Component\\Serializer\\Serializer->denormalize(Array, 'CanIHaveSomeCof...')
#3 /var/www/REMOVED/vendor/canihavesomecoffee/thetvdbapi/src/DataParser.php(80): CanIHaveSomeCoffee\\TheTVDbAPI\\DataParser::parseData(Array, 'CanIHaveSomeCof...')
#4 /var/www/REMOVED/vendor/canihavesomecoffee/thetvdbapi/src/Route/SearchRoute.php(90): CanIHaveSomeCoffee\\TheTVDbAPI\\DataParser::parseDataArray(Array, 'CanIHaveSomeCof...')
#5 /var/www/REMOVED/vendor/canihavesomecoffee/thetvdbapi/src/Route/SearchRoute.php(102): CanIHaveSomeCoffee\\TheTVDbAPI\\Route\\SearchRoute->search('name', 'Undercover Boss...')
#6 /var/www/REMOVED/Blacklight/processing/tv/TVDB.php(287): CanIHaveSomeCoffee\\TheTVDbAPI\\Route\\SearchRoute->searchByName('Undercover Boss...')
#7 /var/www/REMOVED/Blacklight/processing/tv/TVDB.php(148): Blacklight\\processing\\tv\\TVDB->getShowInfo('Undercover Boss...', 'US')
#8 /var/www/REMOVED/Blacklight/processing/PostProcess.php(243): Blacklight\\processing\\tv\\TVDB->processSite('', '', '1')
#9 /var/www/REMOVED/misc/update/postprocess.php(125): Blacklight\\processing\\PostProcess->processTv('', '')
#10 {main}
"}
ghost commented 4 years ago

Okay it looks like there was a pull request already merged, I forgot to update ;-)

canihavesomecoffee commented 4 years ago

Yes, apparently theTVDb is returning more NULL values which were previously not being returned :(

And indeed, it was noticed by another user already and a fix merged.