Fixed bug 5288: Missing parameter in recursion of t3lib_div::array_merge_recursive_ov...
authorOliver Hader <oliver.hader@typo3.org>
Wed, 28 Mar 2007 14:00:10 +0000 (14:00 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 28 Mar 2007 14:00:10 +0000 (14:00 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2223 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index 6240ef7..ee7defa 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-03-28  Oliver Hader  <oh@inpublica.de>
+
+       * Fixed bug 5288: Missing parameter in recursion of t3lib_div::array_merge_recursive_overrule
+
 2007-03-28  Ingmar Schlecht  <ingmar@typo3.org>
 
        * Adding page tree backwards compatibility for JavaScript function hilight_row() to tree.js (by Benjamin Mack)
index 28e9116..2e0703b 100755 (executable)
@@ -1646,7 +1646,7 @@ class t3lib_div {
         * @param       array           First array
         * @param       array           Second array, overruling the first array
         * @param       boolean         If set, keys that are NOT found in $arr0 (first array) will not be set. Thus only existing value can/will be overruled from second array.
-        * @param       boolean         If set, values from $arr1 will overrule if they are empty. Default: true
+        * @param       boolean         If set, values from $arr1 will overrule if they are empty or zero. Default: true
         * @return      array           Resulting array where $arr1 values has overruled $arr0 values
         */
        function array_merge_recursive_overrule($arr0,$arr1,$notAddKeys=0,$includeEmtpyValues=true) {
@@ -1654,17 +1654,17 @@ class t3lib_div {
                while(list($key,$val) = each($arr1)) {
                        if(is_array($arr0[$key])) {
                                if (is_array($arr1[$key]))      {
-                                       $arr0[$key] = t3lib_div::array_merge_recursive_overrule($arr0[$key],$arr1[$key],$notAddKeys);
+                                       $arr0[$key] = t3lib_div::array_merge_recursive_overrule($arr0[$key],$arr1[$key],$notAddKeys,$includeEmtpyValues);
                                }
                        } else {
                                if ($notAddKeys) {
                                        if (isset($arr0[$key])) {
-                                               if ($includeEmtpyValues OR $val) {
+                                               if ($includeEmtpyValues || $val) {
                                                        $arr0[$key] = $val;
                                                }
                                        }
                                } else {
-                                       if ($includeEmtpyValues OR $val) {
+                                       if ($includeEmtpyValues || $val) {
                                                $arr0[$key] = $val;
                                        }
                                }