Skip to content

Commit

Permalink
Variable check added on render function
Browse files Browse the repository at this point in the history
  • Loading branch information
Stardog committed Aug 21, 2017
1 parent 28b8107 commit ad40763
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src-phpws2/src/View/JsonErrorView.php
Expand Up @@ -38,7 +38,11 @@ public function render()
$this->displayError($error);
exit;
} else {
\phpws2\Error::errorPage($this->data->error->code);
if (is_object($this->data)) {
\phpws2\Error::errorPage($this->data->error->code);
} else {
\phpws2\Error::errorPage($this->data['error']['code']);
}
}
}

Expand Down

0 comments on commit ad40763

Please sign in to comment.