Guest Posted April 8, 2005 Share Posted April 8, 2005 Hi, I just installed CC3 and I´m getting this error message in Admin when I try to add more images to a product and in the file manager: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/domain/public_html/shop/includes/functions.inc.php on line 158. Any ideas? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 8, 2005 Share Posted April 8, 2005 I did this and it worked for me. ////////////////////////////////// // Walk through files and folders in directory //////// function walk_dir($path, $oneLevel=1) { if ($dir = opendir($path)) { while (false !== ($file = readdir($dir))) { if ($file[0]==".") continue; if (is_dir($path."/".$file) AND $oneLevel==1) { if(is_array($retval)) { $retval = array_merge($retval,walk_dir($path."/".$file)); }else{ $retval = walk_dir($path."/".$file); } } else if (is_file($path."/".$file)) $retval[]=$path."/".$file; } closedir($dir); } return $retval; } Quote Link to comment Share on other sites More sharing options...
Guest Posted April 9, 2005 Share Posted April 9, 2005 Hey! Thanks andyg2! It worked like a charm. Good job... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.