Re: header() not working with a http_response_code
| From: | Lester Caine | Date: | Sat, 09 May 2020 18:48:39 +0000 |
| Subject: | Re: header() not working with a http_response_code | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-327153@lists.php.net to get a copy of this message | ||
On 09/05/2020 18:42, Andrey Repin wrote:
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.ukhttps://github.com/bitweaver/kernel/blob/f91b6271a72cbbe390bf3ce2d13464090c3d1613/kernel_lib.php#L700Your 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).