From d1858e02b5b799e2e1192c421baa8f705f8b6843 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Aug 2021 17:03:41 +0200 Subject: [PATCH] Update card.php --- htdocs/product/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 5600365f014..48ad41fcc97 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -71,8 +71,8 @@ $mesg = ''; $error = 0; $errors = array(); $refalreadyexists = 0; $id = GETPOST('id', 'int'); -$ref = (GETPOST('ref', 'alpha') !== '') ? GETPOST('ref', 'alpha') : null; -$type = (GETPOST('type', 'int') !== '') ? GETPOST('type', 'int') : Product::TYPE_PRODUCT; +$ref = (GETPOSTISSET('ref', 'alpha') ? GETPOST('ref', 'alpha') : null); +$type = (GETPOSTISSET('type', 'int') ? GETPOST('type', 'int') : Product::TYPE_PRODUCT); $action = (GETPOST('action', 'alpha') ? GETPOST('action', 'alpha') : 'view'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha');