FluidTYPO3 / vhs

TYPO3 extension VHS: Fluid ViewHelpers
https://fluidtypo3.org
Other
190 stars 229 forks source link

v:content.render not compatible with PHP 8 #1846

Closed darthnorman closed 11 months ago

darthnorman commented 1 year ago

Exception from line 239 after upgrading to PHP 8.

PHP Warning: Undefined array key "tt_content:38796" in /srv/www/public/typo3conf/ext/vhs/Classes/ViewHelpers/Content/AbstractContentViewHelper.php line 239

TYPO3 11.5.24 VHS 6.1.3 PHP 8.1.15

RKlingler commented 1 year ago

I'm getting the same same exception from line 239 after upgrading to PHP 8.

PHP Warning: Undefined array key "tt_content:38796" in /srv/www/public/typo3conf/ext/vhs/Classes/ViewHelpers/Content/AbstractContentViewHelper.php line 239

TYPO3 11.5.24 VHS 6.1.3 PHP 8.1.15

In #1787 someone already mentioned a potential fix for the issue in this particular case.

In PHP 8 the attempt to read from an array with an undefined array key was converted from a notice into a warning. Code should generally be tested for this, as there might be more lines that throw warnings.

NamelessCoder commented 11 months ago

Fixed in dev-development.