diff --git a/system/CodeIgniter.php b/system/CodeIgniter.php index 368b6130cf..b7a6f4ae5d 100644 --- a/system/CodeIgniter.php +++ b/system/CodeIgniter.php @@ -1,7 +1,5 @@ router->params(); + // The controller method param types may not be string. + // So cannot set `declare(strict_types=1)` in this file. $output = method_exists($class, '_remap') ? $class->_remap($this->method, ...$params) : $class->{$this->method}(...$params); diff --git a/system/Config/BaseConfig.php b/system/Config/BaseConfig.php index ed6fa3e2bc..6789c0e9c7 100644 --- a/system/Config/BaseConfig.php +++ b/system/Config/BaseConfig.php @@ -1,7 +1,5 @@ controller->{$method}(...$params); } catch (Throwable $e) { $code = $e->getCode(); diff --git a/system/View/Parser.php b/system/View/Parser.php index 1a684a1d1e..dc34a74504 100644 --- a/system/View/Parser.php +++ b/system/View/Parser.php @@ -1,7 +1,5 @@ config->filters[$filter]($replace, ...$param); } diff --git a/tests/system/Debug/ExceptionsTest.php b/tests/system/Debug/ExceptionsTest.php index 7285d3e435..3f45399c3c 100644 --- a/tests/system/Debug/ExceptionsTest.php +++ b/tests/system/Debug/ExceptionsTest.php @@ -1,7 +1,5 @@ = 80100 ? null : 'random string'; try { + // We test DEPRECATED error, so cannot set `declare(strict_types=1)` in this file. strlen($maybeNull); $this->assertLogContains('error', '[DEPRECATED] strlen(): '); } catch (ErrorException $e) {