Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simple ignore arguments in exceptions implementation
- Loading branch information
Showing
7 changed files
with
40 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--TEST-- | ||
Exceptions ignoring arguments | ||
--FILE-- | ||
<?php | ||
$function = function(string $user, string $pass) { | ||
throw new Exception(); | ||
}; | ||
|
||
ini_set("zend.exception_ignore_args", 1); | ||
|
||
$function("secrets", "arewrong"); | ||
?> | ||
--EXPECTF-- | ||
Fatal error: Uncaught Exception in %sexception_ignore_args.php:3 | ||
Stack trace: | ||
#0 %sexception_ignore_args.php(8): {closure}() | ||
#1 {main} | ||
thrown in %sexception_ignore_args.php on line 3 |
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
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
0819e6d
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.
Does this also affect the result of
(new Exception)->getTrace()
?0819e6d
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.
@JanTvrdik Yes.