[TYPO3-core] RFC: bug #1326
Wolfgang Klinger
wolfgang at stufenlos.net
Fri Feb 24 19:58:51 CET 2006
*hiya!*
Type: bugfix
"Passed variable is not an array or object" warnings in
"array_merge_recursive_overrule"
BT reference: http://bugs.typo3.org/view.php?id=1326
I don't like this kind of patches, but we are on the save
side with that though.
bye
Wolfgang
-------------- next part --------------
--- TYPO3core/t3lib/class.t3lib_div.php 2006-02-24 11:01:07.000000000 +0100
+++ TYPO3core_testing/t3lib/class.t3lib_div.php 2006-02-24 19:52:56.000000000 +0100
@@ -1473,6 +1473,12 @@
* @return array Resulting array where $arr1 values has overruled $arr0 values
*/
function array_merge_recursive_overrule($arr0,$arr1,$notAddKeys=0,$includeEmtpyValues=true) {
+ if (!is_array($arr0)) {
+ $arr0 = array();
+ }
+ if (!is_array($arr1)) {
+ $arr1 = array();
+ }
reset($arr1);
while(list($key,$val) = each($arr1)) {
if(is_array($arr0[$key])) {
More information about the TYPO3-team-core
mailing list