diff --git a/Response.php b/Response.php index aa6b296..92a68a2 100644 --- a/Response.php +++ b/Response.php @@ -21,7 +21,7 @@ public function __construct($raw, $info) $this->raw = $raw; $this->processed = $raw; $this->info = $info; - $this->error = ! empty($raw['error']) + $this->error = is_array($raw) && ! empty($raw['error']) ? $raw : null; if ( isset($this->info['http_code']) ) {