|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55684 Example #1 header_register_callback
Submitted: 2011-09-13 14:13 UTC Modified: 2011-09-13 15:09 UTC
From: gwarnants at gmail dot com Assigned: rquadling (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: gwarnants at gmail dot com
New email:
PHP Version: OS:


 [2011-09-13 14:13 UTC] gwarnants at gmail dot com
From manual page:

Example #1 is testing the availability of header "X-Powered" before removing "X-Powered-By" header, which is not completely safe.

Expected result:
   if (strpos($header, 'X-Powered-By') === 0) {

Actual result:
   if (strpos($header, 'X-Powered') !== false) {


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-13 15:09 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: rquadling
 [2011-09-13 15:09 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

Log: Rename file. Fix bug #55679
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 05:01:30 2024 UTC