Fix PHP 5.0.5 compability issue
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Fri, 25 Nov 2005 12:34:45 +0000 (12:34 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Fri, 25 Nov 2005 12:34:45 +0000 (12:34 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@883 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_timetrack.php

index 165f961..d0646d9 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-11-25  Martin Kutschker   <martin.t.kutschker@blackbox.net>
+
+       * Fixed PHP 5.0.5 compability issue with end() in class.t3lib_timetrack.php
+
 2005-11-24  Christian Jul Jensen  <christian@jul.net>
 
        * Added GET-params "module" and "modParams" to alt_main.php to allow external urls to access specific points in modules
index 49fab7f..683188b 100755 (executable)
@@ -364,7 +364,12 @@ class t3lib_timeTrack {
                                        $keyLabel='<br /><font color="#999999">'.implode($temp,'<br />').'</font>';
                                }
                        }
-                       $theLabel = $flag_tree ? end(t3lib_div::trimExplode('.',$data['key'],1)) : $data['key'];
+                       if ($flag_tree) {
+                               $tmp = t3lib_div::trimExplode('.',$data['key'],1);
+                               $theLabel = end($tmp);
+                       } else {
+                               $theLabel = $data['key'];
+                       }
                        $theLabel = t3lib_div::fixed_lgd_pre($theLabel, $keyLgd);
                        $theLabel = $data['stackPointer'] ? '<font color="maroon">'.$theLabel.'</font>' : $theLabel;
                        $keyLabel=$theLabel.$keyLabel;