Skip to content

Commit

Permalink
Merge pull request #6 from djekl/2.0.x-dev
Browse files Browse the repository at this point in the history
output response codes that co-incide with the error codes
  • Loading branch information
Alan Wynn committed Jul 4, 2013
2 parents bfc4dd4 + 2780828 commit 8f06fa8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/includes/classes/base.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ public function output_payload($data) {
}

public function output_error($code) {
// output the response code
if(array_key_exists((int)$code, $this->errors)) {
http_response_code((int)$code);
}

if($this->version == "1.0") {
$payload = array(
"Error" => $this->errors[$code],
Expand Down

0 comments on commit 8f06fa8

Please sign in to comment.