75210[BUGFIX] Always call GU::trimExplode with string in extbase/fluid
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
-
Verified V +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/extbase/Classes/DependencyInjection/TypeConverterPass.php+1 −1
- typo3/sysext/extbase/Classes/Service/CacheService.php+1 −1
- typo3/sysext/extbase/Classes/Utility/ExtensionUtility.php+4 −6
- typo3/sysext/fluid/Classes/ViewHelpers/Format/BytesViewHelper.php3+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php7+1 −1
Review log 1720
-
Oliver Klee uploaded patch set 1 07/16/22, 17:16
-
core-ci voted on patch set 1 V +1 07/16/22, 17:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29289
-
Nikita Hovratov commented on patch set 1 07/16/22, 19:50
-
Nikita Hovratov commented on patch set 1 07/16/22, 19:51
Related -
Oliver Klee updated the commit message in patch set 2 07/16/22, 20:16
-
Oliver Klee commented on patch set 2 07/16/22, 20:16
Reply
DoneBytesViewHelper.php:94ReplyIn line 92, the translate call can return false if the localized string is not found. Referring to line 90: It's possible (although not a good idea of course) to set an integer, an array or a boolean as the "units" argument. Even in those cases, the ViewHelper should not crash with a type error. -
core-ci voted on patch set 2 V +1 07/16/22, 20:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29300
-
Nikita Hovratov commented on patch set 2 CR +1 07/16/22, 20:58
BytesViewHelper.php:94Replyokay. I mean ViewHelpers have their own type validation and will throw if the type does not match. But it's okay as ViewHelpers could also be called in code. -
Stefan Bürk commented on patch set 2 07/17/22, 11:18
CObjectViewHelper.php:124Is this really needed argument key should be always there. Even if it is a "null" value - so string cast would be sufficient. Or what do I missed that the fallback is needed here ? -
Oliver Klee commented on patch set 2 07/17/22, 11:46
CObjectViewHelper.php:124ReplyIn general, view helpers can also be called from PHP. In those cases, it is not ensured that all arguments that are registered as required are actually provided. (And this helps with static analysis as PHPStan (or any other tool) cannot know of this magic.) I'd also be okay with dropping the fallback (but would prefer it to stay). -
Stefan Bürk commented on patch set 2 07/17/22, 13:05
CObjectViewHelper.php:124ReplyNever directly used a viewhelper .. but okay, may be used in that way. Following that argumentation, all viewhelper should have fallback for all arguments then and reintroduce type/fallback checks anyway .... -
Oliver Klee commented on patch set 2 07/17/22, 13:06
CObjectViewHelper.php:124ReplyYes, they should have indeed (but not in this change :-) ). -
Oliver Klee commented on patch set 2 07/18/22, 11:37
CObjectViewHelper.php:124ReplyIf it helps get this change merged, I can also drop the fallbacks for the view helper arguments. -
Nikita Hovratov commented on patch set 2 07/19/22, 16:53
CObjectViewHelper.php:124ReplyLet's do this, Oliver. The ViewHelper arguments can be done in one patch someday and it's rather an edgecase calling them in PHP code directly. -
Oliver Klee uploaded patch set 3 07/21/22, 10:33
-
Oliver Klee commented on patch set 3 07/21/22, 10:33
CObjectViewHelper.php:124ReplyDone. -
core-ci voted on patch set 3 V +1 07/21/22, 10:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29398
-
Stefan Bürk voted on patch set 3 V +1 CR +1 07/25/22, 21:00
-
Christian Kuhn voted on patch set 3 V +2 CR +2 07/27/22, 06:41
-
Christian Kuhn merged patch set 4 07/27/22, 06:41
BytesViewHelper.php:94