diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index c2b933df08b..7da5d40851c 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -2772,12 +2772,6 @@ parameters: count: 2 path: ../../../htdocs/comm/action/class/cactioncomm.class.php - - - message: '#^Variable \$TSystem might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/comm/action/class/cactioncomm.class.php - - message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 19b0fdf74e3..4a5689452a7 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2002-2003 Rodolphe Quiedeville * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2024-2025 MDW + * Copyright (C) 2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -189,13 +190,13 @@ class CActionComm $resql = $this->db->query($sql); if ($resql) { $nump = $this->db->num_rows($resql); + $TSystem = array( + 'id' => [], + 'code' => [], + 'all' => [] + ); if ($nump) { $idforallfornewmodule = 96; - $TSystem = array( - 'id' => [], - 'code' => [], - 'all' => [] - ); $TSystemAuto = array( 'id' => [], 'code' => [],