-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix error handling during opcache compilation #18541
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
base: master
Are you sure you want to change the base?
Changes from 4 commits
731db8e
1dd8bf4
279831c
6b0cabc
4338079
801fd60
3ec6d9d
72766ed
fd729cb
167e45e
0127e1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one fails when OPcache is not loaded. It still says the “During inheritance of C” bit. Thus:
This would make sense to me. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--TEST-- | ||
GH-17422 (OPcache bypasses the user-defined error handler for deprecations) | ||
--INI-- | ||
opcache.enable=1 | ||
opcache.enable_cli=1 | ||
--EXTENSIONS-- | ||
opcache | ||
--FILE-- | ||
<?php | ||
|
||
require __DIR__ . "/shutdown.inc"; | ||
|
||
set_error_handler(static function (int $errno, string $errstr, string $errfile, int $errline) { | ||
echo "set_error_handler: {$errstr}", PHP_EOL; | ||
}); | ||
|
||
require __DIR__ . "/warning.inc"; | ||
|
||
warning(); | ||
|
||
?> | ||
--EXPECT-- | ||
set_error_handler: "continue" targeting switch is equivalent to "break" | ||
OK: warning | ||
array(3) { | ||
[0]=> | ||
string(7) "001.php" | ||
[1]=> | ||
string(12) "shutdown.inc" | ||
[2]=> | ||
string(11) "warning.inc" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also have a test that tries to catch the exception or are the new tests in
ext/opcache/tests/gh17422/
sufficient?