Skip to content

Commit

Permalink
fix logical errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rmahoney-bl committed Nov 11, 2016
1 parent d1b23d3 commit 2488431
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ private function getJsonInput () : array
}
$input = json_decode($input, true);
if (json_last_error() == JSON_ERROR_NONE) {
return [];
return $input;
}
return $json;
return [];
}

public function run($method = false, $path = false, &$code = false)
Expand Down Expand Up @@ -377,8 +377,8 @@ public function run($method = false, $path = false, &$code = false)
try {
http_response_code(200);
ob_start();
$input = array_unshift($route[2], $this->getJsonInput());
$response = $this->execute($route[1], $input);
array_unshift($route[2], $this->getJsonInput());
$response = $this->execute($route[1], $route[2]);
if ($response === false) {
$output = false;
} else {
Expand Down

0 comments on commit 2488431

Please sign in to comment.