From b67a14c7d66ea68cc1b9f261e3fc9a47348516de Mon Sep 17 00:00:00 2001 From: phf Date: Tue, 13 Jun 2017 10:20:26 +0200 Subject: [PATCH] Fix ajax search product is broken --- htdocs/product/ajax/products.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index 159ee6c272e..c8b81caa9fc 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -182,8 +182,10 @@ else $idprod = (! empty($match[0]) ? $match[0] : ''); if (GETPOST($htmlname,'alpha') == '' && (! $idprod || ! GETPOST($idprod,'alpha'))) + { print json_encode(array()); return; + } // When used from jQuery, the search term is added as GET param "term". $searchkey = (($idprod && GETPOST($idprod,'alpha')) ? GETPOST($idprod,'alpha') : (GETPOST($htmlname, 'alpha') ? GETPOST($htmlname, 'alpha') : ''));