From d79340a6325aada703073a2a295e8be27234e1bd Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Thu, 17 Oct 2019 09:55:02 +0200 Subject: [PATCH] FIX: stock replenish: fetching and freeing non existing SQL result set --- htdocs/product/stock/replenish.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index cc7f5d1f2f5..0bd7f95373b 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -137,7 +137,6 @@ if ($action == 'order' && isset($_POST['valid'])) if ($qty) { //might need some value checks - $obj = $db->fetch_object($resql); $line = new CommandeFournisseurLigne($db); $line->qty = $qty; $line->fk_product = $idprod; @@ -176,7 +175,7 @@ if ($action == 'order' && isset($_POST['valid'])) $error=$db->lasterror(); dol_print_error($db); } - $db->free($resql); + unset($_POST['fourn' . $i]); } unset($_POST[$i]);