-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug #81591: ignore_repeated_errors broken
We should suppress the error if the message is the same, not if it's different. Apparently we had no test coverage for these options.
- Loading branch information
Showing
4 changed files
with
52 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,25 @@ | ||
--TEST-- | ||
Test ignore_repeated_errors ini setting | ||
--INI-- | ||
ignore_repeated_errors=1 | ||
--FILE-- | ||
<?php | ||
|
||
// Not a repeated error due to different variables names. | ||
$u1 + $u2; | ||
|
||
// Repeated error. | ||
$u + $u; | ||
|
||
// Not a repeated error, because the line is different. | ||
$u + 1; | ||
|
||
?> | ||
--EXPECTF-- | ||
Warning: Undefined variable $u1 in %s on line %d | ||
|
||
Warning: Undefined variable $u2 in %s on line %d | ||
|
||
Warning: Undefined variable $u in %s on line %d | ||
|
||
Warning: Undefined variable $u 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--TEST-- | ||
Test ignore_repeated_source ini setting | ||
--INI-- | ||
ignore_repeated_errors=1 | ||
ignore_repeated_source=1 | ||
--FILE-- | ||
<?php | ||
|
||
// Not a repeated error due to different variables names. | ||
$u1 + $u2; | ||
|
||
// Repeated error. | ||
$u + $u; | ||
|
||
// Also a repeated error, because we're ignoring the different source. | ||
$u + 1; | ||
|
||
?> | ||
--EXPECTF-- | ||
Warning: Undefined variable $u1 in %s on line %d | ||
|
||
Warning: Undefined variable $u2 in %s on line %d | ||
|
||
Warning: Undefined variable $u 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