From ad308e33ccbcd313499ca5c71a976848c9b11126 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Thu, 9 Feb 2017 18:29:04 +0100 Subject: [PATCH] Fix scrutinizer warning --- htdocs/product/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 4f1f97cef8a..9efdca6a4d0 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -75,8 +75,8 @@ if (! $sortorder) $sortorder="ASC"; // Initialize context for list $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'productservicelist'; -if ($type === '1') { $contextpage='servicelist'; if ($search_type=='') $search_type='1'; } -if ($type === '0') { $contextpage='productlist'; if ($search_type=='') $search_type='0'; } +if ((string) $type == '1') { $contextpage='servicelist'; if ($search_type=='') $search_type='1'; } +if ((string) $type == '0') { $contextpage='productlist'; if ($search_type=='') $search_type='0'; } // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array($contextpage)); -- GitLab