From 4dd3cb346967e7cebecd2598a259f2587b2c7480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Hahn?= Date: Fri, 13 Dec 2019 07:58:36 +0100 Subject: [PATCH] Prevent stock amount from becoming NULL Set stock to 0 if NULL --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index cac859c53b5..223f34a7dce 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2095,7 +2095,7 @@ class Form } else { - $selectFieldsGrouped = ", p.stock"; + $selectFieldsGrouped = ", ".$db->ifsql("p.stock IS NULL", 0, "p.stock")." AS stock"; } $sql = "SELECT ";