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.
Fixed bug #74673 (Segfault when cast Reflection object to string with…
… undefined constant)
- Loading branch information
Showing
3 changed files
with
34 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--TEST-- | ||
Bug #74673 (Segfault when cast Reflection object to string with undefined constant) | ||
--FILE-- | ||
<?php | ||
|
||
set_error_handler(function() { | ||
throw new Exception(); | ||
}); | ||
|
||
class A | ||
{ | ||
public function method($test = PHP_SELF + 1) | ||
{ | ||
} | ||
} | ||
|
||
$class = new ReflectionClass('A'); | ||
|
||
echo $class; | ||
?> | ||
--EXPECTF-- | ||
Fatal error: Method ReflectionClass::__toString() must not throw an exception, caught Exception: in %sbug74673.php on line %d |