Fix for json errors with error code 0 (my JSON server can return them). ... #1

Closed
wants to merge 1 commit into
from
View
2 lib/Junior/Client.php
@@ -32,7 +32,7 @@ public function sendRequest($req)
throw new Clientside\Exception("Mismatched request id");
}
- if($response->error_code) {
+ if(isset($response->error_code)) {
throw new Clientside\Exception("{$response->error_code} {$response->error_message}", $response->error_code);
}