76640[BUGFIX] Avoid undefined array key access in ImageViewHelper
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 2
Review log 2023
-
Francois Suter uploaded patch set 1 11/16/22, 09:15
-
core-ci voted on patch set 1 V +1 11/16/22, 09:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33812
-
Stefan Bürk commented on patch set 1 CR -1 11/16/22, 09:23
on it -
Francois Suter commented on patch set 1 11/16/22, 09:24
Reply
OK. Have you seen the comment on Slack about the other ImageViewHelper? -
Stefan Bürk uploaded patch set 2 11/16/22, 09:27
-
Stefan Bürk commented on patch set 2 CR -1 11/16/22, 09:28
Reply
nope. let me check ... -
Stefan Bürk uploaded patch set 3 11/16/22, 09:32
-
Francois Suter commented on patch set 3 V +1 CR +1 11/16/22, 09:34
Thanks for the improvements and for taking care of the other view helper. -
Jan Delius voted on patch set 3 CR +1 11/16/22, 09:34
-
Markus Klein voted on patch set 3 CR +1 11/16/22, 09:40
-
Stefan Bürk commented on patch set 3 CR -1 11/16/22, 09:42
on it, thes will get red now ;) -
core-ci voted on patch set 3 V -1 11/16/22, 09:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33815
-
Markus Klein commented on patch set 3 V -1 CR 0 11/16/22, 09:46
looking into something -
Stefan Bürk uploaded patch set 4 11/16/22, 09:47
-
Markus Klein commented on patch set 3 V -1 CR -1 11/16/22, 09:53
I can't reproduce this on v11 with PHP 8.1 Optional arguments are always initialized with `null`, hence no undefined key error -
Markus Klein voted on patch set 4 V -1 CR -1 11/16/22, 09:53
-
core-ci voted on patch set 4 V +1 11/16/22, 09:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33818
-
Stefan Bürk commented on patch set 4 11/16/22, 09:58
Reply
We (lolli) with Claus Due - not remembering the right case, but I thing if you have that argement in your fluid template using a variable which is not defined, this leads to these kind of array key access errors. We could not convince him way back that this is an error. Not sure If lolli have fixed this in fluid yet. -
Stefan Bürk commented on patch set 4 11/16/22, 10:00
Reply
<f:image image="{image}" fileExtension="{undefinedVar}" /> -
Oliver Klee commented on patch set 4 11/16/22, 10:11
ImageViewHelper.php:149UnresolvedAs $fileExtension is s string, we should do a !== ‘’ check instead.ImageViewHelper.php:175UnresolvedAs $fileExtension is s string, we should do a !== ‘’ check instead. -
Christian Kuhn commented on patch set 4 11/16/22, 10:18
Reply
https://github.com/TYPO3/Fluid/issues/584 can reproduce with this functional test case: <f:image src="EXT:fluid/Tests/Functional/Fixtures/ViewHelpers/ImageViewHelperTest.jpg" width="300" height="500" crop="null" fileExtension="{{notExistingVariable}}" /> -
Markus Klein commented on patch set 4 11/16/22, 12:03
Reply
So this must be fixed in Fluid! (not in all usages of arguments) -
Francois Suter abandoned the change 01/25/23, 17:09
Not reproducible, happened in a single hosting for unknown reasons.