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.
This commit is contained in:
thibdrev 2024-02-02 13:43:08 +01:00 committed by GitHub
parent ff04c99542
commit dee08cc7c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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