I've noticed we're getting the following error each time we use the update button when editing products:
PHP Warning: Invalid argument supplied for foreach() in /admin/includes/modules/update_product.php on line 294
It point to this section:
Can anyone see anything obviously wrong with the coding, or can anyone think what's maybe causing it?PHP Code:$sql_del = "delete from product_ebay_shipping_methods where shipping_type = 'International' and products_id = ". $products_id;
$db->Execute($sql_del);
if ($_POST['shipping_imethod1'] != '') {
$strLocation = "";
HERE>>> foreach($_POST['shipping_ilocation1'] as $nam=>$val) {
$strLocation .= "'" . $val . "'" . ",";
}
if ($strLocation != '') {
$strLocation = substr($strLocation,0,strlen($strLocation)-1);
}
$sql_arr_ins = array('products_id' => $products_id,
'shipping_type' => 'International',
'shipping_service' => $_POST['shipping_imethod1'],
'shipping_cost' => $_POST['shipping_icost1'],
'shipping_add_cost' => $_POST['shipping_iadd_cost1'],
'shipping_location' => $strLocation);
zen_db_perform("product_ebay_shipping_methods", $sql_arr_ins);
}



Reply With Quote



Bookmarks