Flowpack / media-ui

The development repository for the new Neos media management interface
GNU General Public License v3.0
20 stars 16 forks source link

AssetCollectionService_Original::getAssetCollectionAssetCount() must be of the type int, string returned #215

Closed simonschaufi closed 9 months ago

simonschaufi commented 9 months ago

Exception in line 99 of .../Packages/Framework/Neos.Flow/Classes/ObjectManagement/DependencyInjection/DependencyProxy.php: Return value of Flowpack\Media\Ui\Service\AssetCollectionService_Original::getAssetCollectionAssetCount() must be of the type int, string returned

https://github.com/Flowpack/media-ui/blob/48a767e349f3f7202525668a7d3bd6f3328154e4/Classes/Service/AssetCollectionService.php#L56

this must be casted to int, then it works:

$carry[$item['id']] = (int)$item['count'];
Sebobo commented 9 months ago

I don't unterstand, I never encountered this issue. How many collections do you have?

simonschaufi commented 9 months ago

Just a hand full. Maybe it depends on mysql?

I debugged at it returns a string as numer so "5" for example.

This is my mysql version: mysql Ver 8.0.34-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

PHP 7.4 Neos 7.3.15