php / php/php-src

html_errors=auto option?

Open
#12,214 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

might be worthwhile to add a html_errors=auto php.ini option, which basically runs a

$html_errors=true;
foreach(headers_list() as $header){
    if(str_starts_with($header, 'Content-type: text/plain')) {
        $html_errors=false;
        break;
    }
}

I would use it.

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

The issue does not name any files or tests. Start by locating the existing html_errors php.ini option and the headers_list() entry point, then determine how an auto mode should choose between HTML and plain-text errors. Done means the option is defined, its header-based behavior is specified, and coverage verifies both content types.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.