Hi I was getting the error below, I noticed it by chance, as when I select the Add to All Categories button it just quickly flashes across the screen, and disappears almost instantaneously. It seems to be working though, just not sure what the error is though.
Warning: array_walk()[function.array-walk]: The argument should be an array in /home/anythin5/public_html/store/admin/categories.php on line 151.
I've included the a few of the lines above and below the error line that I'm getting.
HTML Code:
foreach ($new_temp_parent_cats as $a=>$z) {
$temp_cats = func_query("SELECT categoryid FROM $sql_tbl[categories] WHERE parentid='$z'");
$new_temp_cats = array();
array_walk($temp_cats, 'flatten_array', &$new_temp_cats);
$temp_products = func_query("SELECT $sql_tbl[products].productid FROM $sql_tbl[products] LEFT JOIN $sql_tbl[products_categories] ON $sql_tbl[products].productid = $sql_tbl[products_categories].productid WHERE $sql_tbl[products].forsale='Y' AND $sql_tbl[products_categories].categoryid IN ('$z','".implode("','", $new_temp_cats)."') AND $sql_tbl[products_categories].main = 'Y' ORDER BY RAND() LIMIT $pr_sub_cats");
$new_temp_products = array();
array_walk($temp_products, 'flatten_array', &$new_temp_products);
$neworder = 0;
foreach ($new_temp_products as $c=>$d) {
db_query("INSERT INTO $sql_tbl[featured_products] (productid, product_order, avail, categoryid) VALUES ('$d','$neworder','$newavail', '$z')");
$neworder = $neworder + 10;
}
unset($temp_products);
unset($new_temp_products);
}
}