php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52207 header() not fully documented
Submitted: 2010-06-30 00:28 UTC Modified: 2010-10-20 17:02 UTC
From: olafvdspek at gmail dot com Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.3.2 OS: Debian
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: olafvdspek at gmail dot com
New email:
PHP Version: OS:

 

 [2010-06-30 00:28 UTC] olafvdspek at gmail dot com
Description:
------------
If the first parameter is an empty string, the third parameter appears to be 
ignored. This isn't documented.
If the third parameter is specified, the first one appears to be ignored, but this 
isn't documented either.

Test script:
---------------
header('', false, 404);

Expected result:
----------------
GET /temp/404.php HTTP/1.0
Host: leiden.xwis.net

HTTP/1.0 200 OK
X-Powered-By: PHP/5.3.2-1
Content-type: text/html
Content-Length: 0
Connection: close
Date: Tue, 29 Jun 2010 22:21:19 GMT
Server: lighttpd/1.4.26

Actual result:
--------------
GET /temp/404.php HTTP/1.0
Host: leiden.xwis.net

HTTP/1.0 404 Not Found
X-Powered-By: PHP/5.3.2-1
Content-type: text/html
Content-Length: 0
Connection: close
Date: Tue, 29 Jun 2010 22:20:35 GMT
Server: lighttpd/1.4.26

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-30 00:29 UTC] olafvdspek at gmail dot com
-Summary: Behaviour not properly documented +Summary: header() not fully documented
 [2010-06-30 00:29 UTC] olafvdspek at gmail dot com
Oops, I swapped the actual and expected results, sorry.
 [2010-10-20 04:54 UTC] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=304526
Log: Fixed bug #52207 (header() not fully documented)
 [2010-10-20 04:54 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2010-10-20 04:54 UTC] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2010-10-20 17:02 UTC] olafvdspek at gmail dot com
What about "If the third parameter is specified, the first one appears to be 
ignored, but this 
isn't documented either."?
And what's the design rationale for "If the first parameter is an empty string, 
the third parameter appears to be ignored. This isn't documented."?
 [2020-02-07 06:09 UTC] phpdocbot@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=d380037331bbd05e81af0ddb6e36a289c0ad0ee8
Log: Fixed bug #52207 (header() not fully documented)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 01 01:01:28 2024 UTC