Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
v-dem committed Jul 20, 2022
1 parent 87e46eb commit d63aa08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ public function run()

$output = System::callUserFuncArray($handler, $arguments);

return (!is_string($output) && $this->request->isAjax())
return (!is_string($output) && method_exists($this->request, 'isAjax') && $this->request->isAjax())
? json_encode($output)
: $output;
} catch (RouteNotFoundException $e) {
return $this->page404($this->request);
} catch (Exception $e) {
$this->logger->fatal($e->getMessage());
$this->logger->error($e->getMessage());

return $this->page500($this->request);
}
Expand Down

0 comments on commit d63aa08

Please sign in to comment.