#80071json_encode NAN and INF error in CropVariantCollection.php
Description
Steps to reproduce:
1. Move a image file into fileadmin/user_upload/
2. Try to select the file in TYPO3-Backend to add it to a content element.
Error:
Oops, an error occurred! PHP Catchable Fatal Error: Method TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection::__toString() must return a string value in /var/www/typo3_src-8.6.1/typo3/sysext/backend/Classes/Form/Element/ImageManipulationElement.php line 289
Quick Workaround:
return json_encode(unserialize(str_replace(array('NAN;', 'INF;'), '0;', serialize($cropVariantsAsArray))));
This is not a good solution.. I think the error comes from that the file has no reference in the database?
TYPO3 8.6.1
Thanks,
Timo