Issue Bug Closed

#14969"value" by reference in t3lib_timeTrack.

Joscha Feth 09/14/05, 23:43 updated 08/12/06, 14:21

Description

I encountered this bug using the admin Panel and activatingthe Tree display in the TypoScript field of the panel.
In Line 368 the following line:
$theLabel = $flag_tree ? end(t3lib_div::trimExplode(‘.’,$data[‘key’],1)) : $data[‘key’];

produces an error, because the value of t3lib_div::trimExplode() is given to the end() function which expects getting a reference. But trimExplode() does not give back a reference. It does give back a “normal” value. So I get a fatal error because of passing a value as reference.

The problem is solved by first putting the value of trimExplode() into a variable and passing this to the end()-function, e.g.:
$a = t3lib_div::trimExplode(‘.’,$data[‘key’],1);
$theLabel = $flag_tree ? end($a) : $data[‘key’];

might (i am pretty sure) be a PHP5 problem. I am running PHP 5.1RC1 on my testing server.
(issue imported from #M1452)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.