Skip to content

Commit

Permalink
[Runtime][ErrorHandler] Don't mess with ini_set('assert.warning')
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jul 16, 2023
1 parent 6f2e603 commit 96271b3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/Symfony/Component/ErrorHandler/Debug.php
Expand Up @@ -31,7 +31,6 @@ public static function enable(): ErrorHandler

@ini_set('zend.assertions', 1);
ini_set('assert.active', 1);
ini_set('assert.warning', 0);
ini_set('assert.exception', 1);

DebugClassLoader::enable();
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/ErrorHandler/Tests/ErrorHandlerTest.php
Expand Up @@ -665,6 +665,7 @@ public function testAssertQuietEval()
$this->markTestSkipped('zend.assertions is forcibly disabled');
}

set_error_handler(function () {});
$ini = [
ini_set('zend.assertions', 1),
ini_set('assert.active', 1),
Expand All @@ -673,6 +674,7 @@ public function testAssertQuietEval()
ini_set('assert.callback', null),
ini_set('assert.exception', 0),
];
restore_error_handler();

$logger = new BufferingLogger();
$handler = new ErrorHandler($logger);
Expand Down
Expand Up @@ -32,7 +32,6 @@ public static function register(bool $debug): void
if (0 <= \ini_get('zend.assertions')) {
ini_set('zend.assertions', 1);
ini_set('assert.active', $debug);
ini_set('assert.warning', 0);
ini_set('assert.exception', 1);
}

Expand Down

0 comments on commit 96271b3

Please sign in to comment.