Issue Bug Closed

#97337Empty $trustedProperties cause a PHP warning

Marc Hirdes 04/08/22, 07:13 updated 07/09/24, 12:46

Description

In extbase/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php line 144

   $trustedProperties = json_decode($serializedTrustedProperties, true);
   foreach ($trustedProperties as $propertyName => $propertyConfiguration) {

We get a PHP warning in our error log:

Core: Error handler (FE): PHP Warning: Invalid argument supplied for foreach() in typo3/sysext/extbase/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php line 154

This fills the error log of a customer page. The page is attacked weekly, but at the moment this is the only problem.

The solution would be to provide an empty array for the foreach loop.

Reviews 3