Skip to content

Commit

Permalink
fixed php error caused by not setting $output in the case of $this->r…
Browse files Browse the repository at this point in the history
…esponse(array())
  • Loading branch information
ggoforth committed Nov 7, 2011
1 parent db8de8f commit 730b5cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions application/libraries/REST_Controller.php
Expand Up @@ -230,6 +230,9 @@ public function response($data = array(), $http_code = null)
if (empty($data) && $http_code === null)
{
$http_code = 404;

//create the output variable here in the case of $this->response(array());
$output = $data;
}

// Otherwise (if no data but 200 provided) or some data, carry on camping!
Expand Down

0 comments on commit 730b5cb

Please sign in to comment.