php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75875 Third argument of header() function has wrong description.
Submitted: 2018-01-25 22:34 UTC Modified: 2018-01-26 09:13 UTC
From: poczta at mwojtowicz dot it Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: poczta at mwojtowicz dot it
New email:
PHP Version: OS:

 

 [2018-01-25 22:34 UTC] poczta at mwojtowicz dot it
Description:
------------
---
From manual page: http://www.php.net/function.header
---

    <varlistentry>
     <term><parameter>http_response_code</parameter></term>
     <listitem>
      <para>
       Forces the HTTP response code to the specified value. Note that this 
       parameter only has an effect if the <parameter>string</parameter> is 
       not empty.
      </para>
     </listitem>
    </varlistentry>

should be at least


    <varlistentry>
     <term><parameter>http_response_code</parameter></term>
     <listitem>
      <para>
       Forces the HTTP response code to the specified value. Note that this 
       parameter only has an effect if the <parameter>http_response_code</parameter> is 
       not empty.
      </para>
     </listitem>
    </varlistentry>

I wonder if there should be sentence "is not null" rather than "is not empty".


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-26 09:10 UTC] vrana@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=343909
Log: Rename first parameter to header (bug #75875)
 [2018-01-26 09:13 UTC] vrana@php.net
-Status: Open +Status: Not a bug
 [2018-01-26 09:13 UTC] vrana@php.net
It talks about the first parameter named $string. I've renamed it to $header which is also its name in the sources: https://github.com/php/php-src/blob/9edf2e9f/ext/standard/head.c#L37
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 01:01:32 2025 UTC