[BUGFIX] Ensure result is string in __toString of CropVariantCollection 87/59887/2
authorSusanne Moog <susanne.moog@typo3.com>
Wed, 6 Mar 2019 17:57:59 +0000 (18:57 +0100)
committerDaniel Goerz <daniel.goerz@posteo.de>
Sat, 16 Mar 2019 11:24:09 +0000 (12:24 +0100)
commitf51f1470bb179f1d8599c108373e630de6aab2e3
tree783d22ddec746818b241e35ab2658214486b32d6
parent521ecb29da4255a9302bd0a0f0e06b14fa0974ad
[BUGFIX] Ensure result is string in __toString of CropVariantCollection

CropVariantCollection returns output from json_encode in its __toString
method. Json_encode may return false if it fails to properly encode the
given data (mostly when non-UTF8 data is given). To ensure that no
exception is thrown to the user in that case, the __toString method
has been adjusted to return the same result as in the empty variants case.

Resolves: #79823
Releases: master, 9.5
Change-Id: Idfbdbbbd867251c8480a0729412dd6d652f57ee1
Reviewed-on: https://review.typo3.org/c/59887
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Stephan GroƟberndt <stephan.grossberndt@typo3.org>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
typo3/sysext/core/Classes/Imaging/ImageManipulation/CropVariantCollection.php
typo3/sysext/core/Tests/Unit/Imaging/ImageManipulation/CropVariantCollectionTest.php