Fixed bug #7976: prioriCalc does not work correctly
authorOliver Hader <oliver.hader@typo3.org>
Mon, 31 Mar 2008 18:02:15 +0000 (18:02 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 31 Mar 2008 18:02:15 +0000 (18:02 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3492 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index f7a8586..4152361 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
        * Followup to #6087: Cleaned up code of IRRE localization
        * Cleaned up code of scripts in t3lib/ and typo3/
        * Fixed bug #7971: Missing icon in t3skin for header - tt_content_header.gif (thanks to Steffen Kamper)
+       * Fixed bug #7976: prioriCalc does not work correctly
 
 2008-03-31  Dmitry Dulepov  <dmitry@typo3.org>
 
index ced57c2..66c2b7e 100755 (executable)
@@ -1292,9 +1292,10 @@ final class t3lib_div {
                $number=0;
                $Msign='+';
                $err='';
-               $buffer=doubleval(array_shift($reg[2]));
+               $buffer=doubleval(current($reg[2]));
+               next($reg[2]);  // Advance pointer
 
-               foreach ($reg[2] as $k => $v) {
+               while(list($k,$v)=each($reg[2])) {
                        $v=doubleval($v);
                        $sign = $reg[1][$k];
                        if ($sign=='+' || $sign=='-')   {