Project

General

Profile

Actions

Bug #97337

closed

Empty $trustedProperties cause a PHP warning

Added by Marc Hirdes over 2 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Extbase
Start date:
2022-04-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #101525: foreach() argument must be of type array|object, null given in MvcPropertyMappingConfigurationService.phpClosed2023-08-02

Actions
Actions

Also available in: Atom PDF