diff --git a/Classes/Configuration/AdditionalConfiguration.php b/Classes/Configuration/AdditionalConfiguration.php index 7998e86..3ddb7fa 100644 --- a/Classes/Configuration/AdditionalConfiguration.php +++ b/Classes/Configuration/AdditionalConfiguration.php @@ -38,10 +38,7 @@ class AdditionalConfiguration 'displayErrors' => 1, 'systemLogLevel' => 0, 'exceptionalErrors' => 12290, - 'errorHandlerErrors' => E_ALL & ~( - E_STRICT | E_NOTICE | E_WARNING | E_COMPILE_WARNING | E_COMPILE_ERROR - | E_CORE_WARNING | E_CORE_ERROR | E_PARSE | E_ERROR - ), + 'errorHandlerErrors' => 0, ], ]; @@ -55,6 +52,21 @@ class AdditionalConfiguration 'transport_smtp_server' => 'mailpit:1025' ]; + public function __construct() + { + if (PHP_VERSION_ID >= 80400) { + $this->developConfig['SYS']['errorHandlerErrors'] = E_ALL & ~( + \E_NOTICE | \E_WARNING | \E_COMPILE_WARNING | \E_COMPILE_ERROR + | \E_CORE_WARNING | \E_CORE_ERROR | \E_PARSE | \E_ERROR + ); + } else { + $this->developConfig['SYS']['errorHandlerErrors'] = \E_ALL & ~( + \E_STRICT | \E_NOTICE | \E_WARNING | \E_COMPILE_WARNING | \E_COMPILE_ERROR + | \E_CORE_WARNING | \E_CORE_ERROR | \E_PARSE | \E_ERROR + ); + } + } + public function initialize(array $configuration = []): void { $this->addContextToSitename();