From 26b845e052d492233e20c09cf63f049e0ecda5af Mon Sep 17 00:00:00 2001 From: thibdrev Date: Fri, 19 Jan 2024 20:09:21 +0100 Subject: [PATCH] qual: phpstan htdocs/public/partnership/new.php 275 Property Societe::$country_id (int) does not accept array|string. htdocs/public/partnership/new.php 276 Property CommonObject::$state_id (int) does not accept array|string. htdocs/public/partnership/new.php 303 Property Societe::$country_id (int) does not accept array|string. htdocs/public/partnership/new.php 312 Property CommonObject::$state_id (int) does not accept array|string. --- htdocs/public/partnership/new.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/public/partnership/new.php b/htdocs/public/partnership/new.php index 5fb9e2b194b..a3e6f0ffbc1 100644 --- a/htdocs/public/partnership/new.php +++ b/htdocs/public/partnership/new.php @@ -272,8 +272,8 @@ if (empty($reshook) && $action == 'add') { $company->town = GETPOST('town'); $company->email = GETPOST('email'); $company->url = GETPOST('url'); - $company->country_id = GETPOST('country_id', 'int'); - $company->state_id = GETPOST('state_id', 'int'); + $company->country_id = GETPOSTINT('country_id'); + $company->state_id = GETPOSTINT('state_id'); $company->name_alias = dolGetFirstLastname(GETPOST('firstname'), GETPOST('lastname')); $resultat=$company->create($user); @@ -300,7 +300,7 @@ if (empty($reshook) && $action == 'add') { $company->town = GETPOST('town'); } if (empty($company->country_id)) { - $company->country_id = GETPOST('country_id', 'int'); + $company->country_id = GETPOSTINT('country_id'); } if (empty($company->email)) { $company->email = GETPOST('email'); @@ -309,7 +309,7 @@ if (empty($reshook) && $action == 'add') { $company->url = GETPOST('url'); } if (empty($company->state_id)) { - $company->state_id = GETPOST('state_id', 'int'); + $company->state_id = GETPOSTINT('state_id'); } if (empty($company->name_alias)) { $company->name_alias = dolGetFirstLastname(GETPOST('firstname'), GETPOST('lastname'));