Fixed bug #7677: Constants are not correctly substituted on some PHP5 distributions
authorOliver Hader <oliver.hader@typo3.org>
Sat, 17 Jan 2009 18:38:40 +0000 (18:38 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 17 Jan 2009 18:38:40 +0000 (18:38 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@4743 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tstemplate.php

index 32ba9f5..3c14aad 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-01-17  Oliver Hader  <oliver@typo3.org>
+
+       * Fixed bug #7677: Constants are not correctly substituted on some PHP5 distributions
+
 2009-01-16  Steffen Kamper  <info@sk-typo3.de>
 
        * Fixed bug #9307: Remove an obsolete check for disable_exec_function in filelist
index 80e8869..4181699 100755 (executable)
@@ -823,11 +823,11 @@ class t3lib_TStemplate    {
                if ($this->tt_track)    $GLOBALS['TT']->pull();
 
                        // Searching for possible unsubstituted constants left (only for information)
-               if (strstr($all,'{$'))  {
-                       $findConst = explode('{$',$all);
-                       $theConstList=Array();
-                       next($findConst);
-                       while(list(,$constVal)=each($findConst))        {
+               if (strstr($all, '{$')) {
+                       $theConstList = array();
+                       $findConst = explode('{$', $all);
+                       array_shift($findConst);
+                       foreach ($findConst as $constVal) {
                                $constLen=t3lib_div::intInRange(strcspn($constVal,'}'),0,50);
                                $theConstList[]='{$'.substr($constVal,0,$constLen+1);
                        }