go to bug id or search bugs for
header('Location: foo') overrides the response code if it isn't 201 or 301-307, inclusive. With 308 Permanent Redirect now being added to HTTP 1.1, this is overly restrictive. We should prevent changing the response code for any 3xx response code.
header('HTTP/1.1 308 Permanent Redirect');
HTTP/1.1 308 Permanent Redirect
HTTP/1.1 302 Found
Add a Patch
Add a Pull Request
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.