forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix RECV opcode to handle all kinds of exceptions
fix RECV opcode to handle exceptions thrown from user-defined error handler as a result Notice error from failed type coercion
- Loading branch information
1 parent
7d93363
commit 19759a5
Showing
3 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--TEST-- | ||
Bug #72057 (PHP hangs when user error handler throws exception after Notice from type coercion) | ||
--FILE-- | ||
<?php | ||
|
||
set_error_handler( | ||
function() { | ||
throw new Exception("My custom error"); | ||
} | ||
); | ||
|
||
(function (int $i) { bar(); })("7as"); | ||
|
||
--EXPECTF-- | ||
|
||
Fatal error: Uncaught Exception: My custom error in %s:%d | ||
Stack trace: | ||
#0 %s(%d): {closure}(8, 'A non well form...', '%s', %d, Array) | ||
#1 %s(%d): {closure}('7as') | ||
#2 {main} | ||
thrown in %s on line %d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters