Issue Bug Closed

#96960PHP 8.1 warning in StoragePermissionsAspect causes 404 in tx_cms_showpic

Benjamin Franzke 02/18/22, 07:07 updated 10/04/22, 14:17

Description

index.php?eID=tx_cms_showpic always returns 404 with PHP 8.1 because of a PHP Warning in StoragePermissionsAspect that is catched in ShowImageController and always converted to 404.

Inspecting the exception catched in https://github.com/TYPO3/typo3/blob/b843e0dac3b59097b3fdda04d22d362ec2de4be1/typo3/sysext/frontend/Classes/Controller/ShowImageController.php#L221-L223
reveals the following PHP warning:

PHP Warning: Undefined global variable $BE_USER in /var/www/html/typo3/sysext/core/Classes/Resource/Security/StoragePermissionsAspect.php line 46

Reviews 2