Merge pull request #27680 from thibdrev/patch-6

qual: phpstan
This commit is contained in:
Laurent Destailleur 2024-01-19 21:07:37 +01:00 committed by GitHub
commit 5d9b422ddd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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'));