fix phpstan

This commit is contained in:
Frédéric France 2024-12-07 14:21:23 +01:00
parent 69681e6450
commit c1b213b39f
No known key found for this signature in database
GPG key ID: CE25B0B7B53B9177
2 changed files with 3 additions and 9 deletions

View file

@ -28506,12 +28506,6 @@ parameters:
count: 1
path: ../../htdocs/public/clicktodial/cidlookup.php
-
message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../../htdocs/public/company/new.php
-
message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType

View file

@ -46,9 +46,9 @@ if (!defined('NOBROWSERNOTIF')) {
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
// Because 2 entities can have the same ref
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
}
// if (is_numeric($entity)) { // value is casted to int so always numeric
define("DOLENTITY", $entity);
// }
// Load Dolibarr environment