From c2e386e2b5ac4103235b2d8d50db6de2a8bef625 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 16 May 2023 18:49:22 +0200 Subject: [PATCH] Better error log --- htdocs/takepos/ajax/ajax.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/takepos/ajax/ajax.php b/htdocs/takepos/ajax/ajax.php index 063b2b06448..af38a5b7ba5 100644 --- a/htdocs/takepos/ajax/ajax.php +++ b/htdocs/takepos/ajax/ajax.php @@ -71,7 +71,12 @@ if ($action == 'getProducts') { $object = new Categorie($db); if ($category == "supplements") { $category = getDolGlobalInt('TAKEPOS_SUPPLEMENTS_CATEGORY'); + if (empty($category)) { + echo 'Error, the category to use for supplements is not defined. Go into setup of module TakePOS.'; + exit; + } } + $result = $object->fetch($category); if ($result > 0) { $filter = array();