-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #172: handle ZEND_VERIFY_NEVER_TYPE when uopz.exit is disabled
- Loading branch information
1 parent
514e2c2
commit bf6fe81
Showing
4 changed files
with
70 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
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,29 @@ | ||
--TEST-- | ||
handle ZEND_VERIFY_NEVER_TYPE when uopz.exit disabled | ||
--EXTENSIONS-- | ||
uopz | ||
--INI-- | ||
uopz.disable=0 | ||
uopz.exit=0 | ||
opcache.enable_cli=0 | ||
xdebug.enable=0 | ||
--FILE-- | ||
<?php | ||
|
||
function x(): never { | ||
exit(10); | ||
} | ||
|
||
x(); | ||
|
||
var_dump(uopz_get_exit_status()); | ||
|
||
uopz_allow_exit(true); | ||
|
||
exit(20); | ||
|
||
echo "not here\n"; | ||
|
||
?> | ||
--EXPECT-- | ||
int(10) |
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,20 @@ | ||
--TEST-- | ||
do not handle ZEND_VERIFY_NEVER_TYPE if not uopz_allow_exit | ||
--EXTENSIONS-- | ||
uopz | ||
--INI-- | ||
uopz.disable=0 | ||
uopz.exit=1 | ||
opcache.enable_cli=0 | ||
xdebug.enable=0 | ||
--FILE-- | ||
<?php | ||
|
||
function x(): never { | ||
return "here"; | ||
} | ||
x(); | ||
|
||
?> | ||
--EXPECTF-- | ||
Fatal error: A never-returning function must not return in %s |