diff --git a/system/Autoloader/Autoloader.php b/system/Autoloader/Autoloader.php index a88c673d5fc0..2e628f1590d6 100644 --- a/system/Autoloader/Autoloader.php +++ b/system/Autoloader/Autoloader.php @@ -123,7 +123,7 @@ public function initialize(Autoload $config, Modules $modules) $this->files = $config->files; } - if (isset($config->helpers)) { + if ($config->helpers !== []) { $this->helpers = [...$this->helpers, ...$config->helpers]; } diff --git a/system/Email/Email.php b/system/Email/Email.php index 24c3af4cd376..2a0facc0ca08 100644 --- a/system/Email/Email.php +++ b/system/Email/Email.php @@ -393,7 +393,7 @@ class Email /** * mbstring.func_overload flag * - * @var bool + * @var bool|null */ protected static $func_overload; @@ -403,8 +403,9 @@ class Email public function __construct($config = null) { $this->initialize($config); + if (! isset(static::$func_overload)) { - static::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload')); + static::$func_overload = extension_loaded('mbstring') && ini_get('mbstring.func_overload'); } } diff --git a/utils/phpstan-baseline/isset.property.neon b/utils/phpstan-baseline/isset.property.neon deleted file mode 100644 index 3b82b6f05443..000000000000 --- a/utils/phpstan-baseline/isset.property.neon +++ /dev/null @@ -1,13 +0,0 @@ -# total 2 errors - -parameters: - ignoreErrors: - - - message: '#^Property Config\\Autoload\:\:\$helpers \(list\\) in isset\(\) is not nullable\.$#' - count: 1 - path: ../../system/Autoloader/Autoloader.php - - - - message: '#^Static property CodeIgniter\\Email\\Email\:\:\$func_overload \(bool\) in isset\(\) is not nullable\.$#' - count: 1 - path: ../../system/Email/Email.php diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 89d0f88ce766..26b6e972f13e 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 3575 errors +# total 3573 errors includes: - argument.type.neon - assign.propertyType.neon @@ -11,7 +11,6 @@ includes: - deadCode.unreachable.neon - empty.notAllowed.neon - generator.valueType.neon - - isset.property.neon - method.alreadyNarrowedType.neon - method.childParameterType.neon - method.childReturnType.neon