php / php/php-src

ignore_repeated_errors ini entry does not work

Open
#19,509 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Category: Engine Feature Status: Verified
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

The following code:

<?php
ini_set('ignore_repeated_errors', 1);
for($i=0; $i<10; $i++ ) {
	trim($at);
}
?>

Resulted in this output in the error-log-file:

[18-Aug-2025 04:51:50 Europe/Vienna] PHP Warning:  Undefined variable $at in D:\Projekte\System\error_test\test.php on line 4
[18-Aug-2025 04:51:50 Europe/Vienna] PHP Warning:  Undefined variable $at in D:\Projekte\System\error_test\test.php on line 4
[18-Aug-2025 04:51:50 Europe/Vienna] PHP Warning:  Undefined variable $at in D:\Projekte\System\error_test\test.php on line 4
[18-Aug-2025 04:51:50 Europe/Vienna] PHP Warning:  Undefined variable $at in D:\Projekte\System\error_test\test.php on line 4
[18-Aug-2025 04:51:50 Europe/Vienna] PHP Warning:  Undefined variable $at in D:\Projekte\System\error_test\test.php on line 4
[18-Aug-2025 04:51:50 Europe/Vienna] PHP Warning:  Undefined variable $at in D:\Projekte\System\error_test\test.php on line 4
[18-Aug-2025 04:51:50 Europe/Vienna] PHP Warning:  Undefined variable $at in D:\Projekte\System\error_test\test.php on line 4
[18-Aug-2025 04:51:50 Europe/Vienna] PHP Warning:  Undefined variable $at in D:\Projekte\System\error_test\test.php on line 4
[18-Aug-2025 04:51:50 Europe/Vienna] PHP Warning:  Undefined variable $at in D:\Projekte\System\error_test\test.php on line 4
[18-Aug-2025 04:51:50 Europe/Vienna] PHP Warning:  Undefined variable $at in D:\Projekte\System\error_test\test.php on line 4

But I expected this output in the error-log-file instead:

[18-Aug-2025 04:51:50 Europe/Vienna] PHP Warning:  Undefined variable $at in D:\Projekte\System\error_test\test.php on line 4
PHP Version
PHP 8.4.11 cli
Operating System

Windows Server 2019

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the report's PHP 8.4.11 CLI example with ini_set('ignore_repeated_errors', 1) and repeated undefined-variable warnings, then trace the ini setting through PHP's error logging entry points. Done means repeated identical warnings are suppressed as shown in the expected log output, with regression coverage for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.