Arrest-MySQL icon indicating copy to clipboard operation
Arrest-MySQL copied to clipboard

Arrest is not returning HTTP code on the header

Open rgr-prog opened this issue 10 years ago • 0 comments

I have noticed that ArrestDB does not set up the HTTP header when a method calls Reply (ArrestDB::Reply(ArrestDB::$HTTP[400])) I'm suggesting you to add this snippet to solve this problem. [ ] 's,

548a549,552
>               if ( is_array($data) && ( array_key_exists('success',$data) || array_key_exists('error',$data)))
>               {
>                   header(sprintf('%s %s %s', $_SERVER["SERVER_PROTOCOL"], $data[key($data)]['code'], $data[key($data)]['status']));
>               }

rgr-prog avatar Sep 28 '15 13:09 rgr-prog