Project

General

Profile

Actions

Bug #14969

closed

"value" by reference in t3lib_timeTrack.

Added by Joscha Feth about 19 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
Frontend
Target version:
-
Start date:
2005-09-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.8.0
PHP Version:
5
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)

Actions #1

Updated by Wolfgang Klinger over 18 years ago

This is obviously already fixed in the latest version from CVS
and I couldn't find any other occurence of "end" called with a function's return value.

Actions

Also available in: Atom PDF