Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ErrorHandler][Runtime] Don't mess with ini_set('assert.warning') #50994

Merged
merged 1 commit into from Jul 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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