Skip to content
Permalink
Browse files

Make the return type of the render function consistent

  • Loading branch information...
michitux committed Sep 17, 2013
1 parent ed35c86 commit cc5fce6dc647baa255f05339791f8afb025fda00
Showing with 4 additions and 4 deletions.
  1. +4 −4 syntax.php
@@ -105,7 +105,7 @@ public function render($mode, &$renderer, $data) {
if ($result === false) {
$this->render_error($renderer, 'YQL: Error: the request to the server failed: '.$client->error);
return;
return true;
}
$json_parser = new JSON();
@@ -114,17 +114,17 @@ public function render($mode, &$renderer, $data) {
// catch YQL errors
if (isset($json_result->error)) {
$this->render_error($renderer, 'YQL: YQL Error: '.$json_result->error->description);
return;
return true;
}
if (is_null($json_result->query->results)) {
$this->render_error($renderer, 'YQL: Unknown error: there is neither an error nor results in the YQL result.');
return;
return true;
}
if (!isset($json_result->query->results->$item_name)) {
$this->render_error($renderer, 'YQL: Error: The item name '.$item_name.' doesn\'t exist in the results');
return;
return true;
}
$renderer->listu_open();

0 comments on commit cc5fce6

Please sign in to comment.
You can’t perform that action at this time.