php-src/Zend/tests/ignore_repeated_errors.phpt
Nikita Popov 4c171ed5eb 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.
2021-11-04 16:23:55 +01:00

26 lines
474 B
PHP

--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