From dee08cc7c5540f7d3278ff540d1738dcd6d0d017 Mon Sep 17 00:00:00 2001 From: thibdrev Date: Fri, 2 Feb 2024 13:43:08 +0100 Subject: [PATCH] qual: phpstan for htdocs/product/stock/card.php (#27965) htdocs/product/stock/card.php 139 Property Entrepot::$fk_project (int) does not accept array|string. htdocs/product/stock/card.php 142 Property Entrepot::$statut (int) does not accept array|string. htdocs/product/stock/card.php 147 Property CommonObject::$country_id (int) does not accept array|string. --- htdocs/product/stock/card.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index eb3a17ffebf..5db1a837a01 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -134,19 +134,19 @@ if (empty($reshook)) { // Ajout entrepot if ($action == 'add' && $user->hasRight('stock', 'creer')) { - $object->ref = (string) GETPOST("ref", "alpha"); - $object->fk_parent = (int) GETPOST("fk_parent", "int"); - $object->fk_project = GETPOST('projectid', 'int'); - $object->label = (string) GETPOST("libelle", "alpha"); - $object->description = (string) GETPOST("desc", "alpha"); - $object->statut = GETPOST("statut", "int"); - $object->lieu = (string) GETPOST("lieu", "alpha"); - $object->address = (string) GETPOST("address", "alpha"); - $object->zip = (string) GETPOST("zipcode", "alpha"); - $object->town = (string) GETPOST("town", "alpha"); - $object->country_id = GETPOST("country_id"); - $object->phone = (string) GETPOST("phone", "alpha"); - $object->fax = (string) GETPOST("fax", "alpha"); + $object->ref = (string) GETPOST("ref", "alpha"); + $object->fk_parent = GETPOSTINT("fk_parent"); + $object->fk_project = GETPOSTINT('projectid'); + $object->label = (string) GETPOST("libelle", "alpha"); + $object->description = (string) GETPOST("desc", "alpha"); + $object->statut = GETPOSTINT("statut"); + $object->lieu = (string) GETPOST("lieu", "alpha"); + $object->address = (string) GETPOST("address", "alpha"); + $object->zip = (string) GETPOST("zipcode", "alpha"); + $object->town = (string) GETPOST("town", "alpha"); + $object->country_id = GETPOSTINT("country_id"); + $object->phone = (string) GETPOST("phone", "alpha"); + $object->fax = (string) GETPOST("fax", "alpha"); if (!empty($object->label)) { // Fill array 'array_options' with data from add form