diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2016-05-29 10:52:08 +0200 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2016-05-29 10:54:45 +0200 |
| commit | 3b200ddeb93cae7410a89f5c334dfc16209b0ff6 (patch) | |
| tree | f4c14255a52ae3e55a7b0717d5d8362b364226a4 /static/classes | |
| parent | e52deaa93064294e6e5ab016c6c02180406497bc (diff) | |
| parent | cc75d1e159d213c3f89725df070ae8f7f83bc00b (diff) | |
Merge branch 'wub/response/fix-http_response_code' into maint
Fixes a bug where Response class `error()` function may blow up and
invalid HTTP status code `42` if `PDO::ATTR_ERRMODE` is set to
`PDO::ERRMODE_EXCEPTION` during PDO initialization or query.
Clarifies what HTTP status codes 200 and 500 are for readability.
Diffstat (limited to 'static/classes')
| -rwxr-xr-x | static/classes/Response.class.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index 27dbd74..eed8ce7 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -78,7 +78,7 @@ class Response break; } - http_response_code($code); + http_response_code(500); // "500 Internal Server Error" echo $response; } @@ -101,7 +101,7 @@ class Response break; } - http_response_code(200); + http_response_code(200); // "200 OK". Success. echo $response; } |
