Re: header() not working with a http_response_code
| From: | Andrey Repin | Date: | Sat, 09 May 2020 17:42:44 +0000 |
| Subject: | Re: header() not working with a http_response_code | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-327152@lists.php.net to get a copy of this message | ||
Greetings, Lester Caine.
In reply to Your message dated Tuesday, May 5, 2020, 17:03:11,
> On 05/05/2020 12:01, Jānis Elmeris wrote:
>> Can you give an example
header call that is not working for
>> you?
>
> https://github.com/bitweaver/kernel/blob/f91b6271a72cbbe390bf3ce2d13464090c3d1613/kernel_lib.php#L700
Your code has so many issues, it won't pass even a simple static analysis, not
to mention any sane code review.
> I've had to comment out the ", TRUE, $pStatusCode );" so that we get a
> simple header( 'Location: ' . $pUrl ); The trigger is normally from a
> 'page not found' and supplies that error code.
> Not quite sure when this stopped working but it has been working for
> many years ...
What "this"? You linked on method that's not calling http_response_code at all
(not even anywhere in the class).
--
Sincerely Yours, Andrey Repin <anrdaemon@freemail.ru>