From 7ca1df6d4658285a5ee4099eed09263f635d74ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 25 Nov 2020 17:12:56 +0100 Subject: [PATCH 1/2] remove warning --- htdocs/bom/bom_card.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 913ba862496..208a316c6e1 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -133,7 +133,7 @@ if (empty($reshook)) $error = 0; // Set if we used free entry or predefined product - $idprod = GETPOST('idprod', 'int'); + $idprod = (int) GETPOST('idprod', 'int'); $qty = GETPOST('qty', 'int'); $qty_frozen = GETPOST('qty_frozen', 'int'); $disable_stock_change = GETPOST('disable_stock_change', 'int'); @@ -172,8 +172,7 @@ if (empty($reshook)) $bomline->position = ($ranktouse + 1); $result = $bomline->create($user); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($bomline->error, $bomline->errors, 'errors'); $action = ''; } else { From 5ff3ab528c3206b9ae428785bfee2dc0a0ff6e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 25 Nov 2020 17:15:06 +0100 Subject: [PATCH 2/2] remove warning --- htdocs/bookmarks/card.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 7cc69ac9a61..ddb043292f6 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -37,8 +37,8 @@ if (!$user->rights->bookmark->lire) { $id = GETPOST("id", 'int'); $action = GETPOST("action", "alpha"); -$title = GETPOST("title", "alpha"); -$url = GETPOST("url", "alpha"); +$title = (string) GETPOST("title", "alpha"); +$url = (string) GETPOST("url", "alpha"); $urlsource = GETPOST("urlsource", "alpha"); $target = GETPOST("target", "alpha"); $userid = GETPOST("userid", "int"); @@ -71,8 +71,9 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if ($action == 'update') $object->fetch(GETPOST("id", 'int')); // Check if null because user not admin can't set an user and send empty value here. - if (!empty($userid)) + if (!empty($userid)) { $object->fk_user = $userid; + } $object->title = $title; $object->url = $url; $object->target = $target;