Re: header() not working with a http_response_code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/05/2020 18:42, Andrey Repin wrote:
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).

This is a static function used when there are no valid object to build an appropriate class on. It has been working for some 20 years without a problem since PHP5 was in beta but is no longer working and simply gives a blank screen without any error message. The new url is for a valid object but now only works if the http_response_code parameter is omitted ...

--
Lester Caine - G8HFL
-----------------------------
Contact - https://lsces.uk/wiki/Contact
L.S.Caine Electronic Services - https://lsces.uk
Model Engineers Digital Workshop - https://medw.uk
Rainbow Digital Media - https://rainbowdigitalmedia.uk



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux