diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 4f1f97cef8a1a327891da64f3dc1fcbaa3b275f8..9efdca6a4d0497d0f0811e41eddb6706c944fcc1 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));