Issue Bug Closed

#79686Found PHP Runtime notices in core: Only variables should be passed by reference

Armin Vieweg 02/08/17, 13:37 updated 10/02/18, 11:02

Description

In latest 7.6:

> Core: Error handler (BE): PHP Runtime Notice: Only variables should be passed by reference in C:\…\vendor\typo3\cms\typo3\sysext\backend\Classes\Form\Container\FlexFormNoTabsContainer.php line 45

In current master, it’s line 44.

The problem is the combination of array_keys inside of array_pop:

$sheetName = array_pop(array_keys($flexFormDataStructureArray['sheets']));

I had a similar issue in my DCE extension. Here I’ve used a nested reset which caused the same issue:

$datamap = reset(reset($pObj->datamap));

So this affects all array commands, which handles given array parameter as reference.

Reviews 2