|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
49 - 47 = ?
Subscribe to this entry?

 [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: Thu Jun 13 14:01:33 2024 UTC