Most of time I'm able to solve issues but in this case I realy cannot figure out what is wrong. I have Qtpro for Osc2.3 installed and are having problems with updating stock. To make it more interesting: I can update stock from my own internet connection, from any device but when connected to any other internet option/location with any device (even devices used on my own network on which it works) I get the below error. This happens on 2 website (same domain); One is OSC 2.2, the other 2.3.3...both on PHP 5.2.
Warning: sort() expects parameter 1 to be array, null given in /home/xxx/domains/xxx/public_html/catalog/admin/stock.php on line 69
Warning: join() [function.join]: Invalid arguments passed in /home/xxx/domains/xxx/public_html/catalog/admin/stock.php on line 70
Above resulting in messy rows in the products_stock db.
if ($HTTP_SERVER_VARS['REQUEST_METHOD']=="GET") {
$VARS=$_GET;
} else {
$VARS=$_POST;
}
if ($VARS['action']=="Add") {
$inputok = true;
if (!(is_numeric($VARS['product_id']) and ($VARS['product_id']==(int)$VARS['product_id']))) $inputok = false;
while(list($v1,$v2)=each($VARS)) {
if (preg_match("/^option(\d+)$/",$v1,$m1)) {
if (is_numeric($v2) and ($v2==(int)$v2)) $val_array[]=$m1[1]."-".$v2;
else $inputok = false;
}
}
if (!(is_numeric($VARS['quantity']) and ($VARS['quantity']==(int)$VARS['quantity']))) $inputok = false;
if (($inputok)) {
sort($val_array, SORT_NUMERIC);
$val=join(",",$val_array);
The last 2 lines above are 69 and 70.
Does anyone have any idea what the issue could be?