Skip to content

Commit

Permalink
Fixed getMessage name on Not Found Handler not called cause getMessag…
Browse files Browse the repository at this point in the history
…e on JsonHandler
  • Loading branch information
Samuel Martins committed Sep 8, 2017
1 parent 7298b11 commit be6f896
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NotFoundHttpHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ trait NotFoundHttpHandler
*/
public function notFoundHttpException(NotFoundHttpException $exception)
{
$this->response->setMessage($this->getMessage($exception));
$this->response->setMessage($this->getNotFoundMessage($exception));
$this->response->setCode($this->getCode('not_found_http'));
$this->response->setDescription($this->getDescription($exception));
$this->response->setHttpCode($exception->getStatusCode());
Expand All @@ -27,7 +27,7 @@ public function notFoundHttpException(NotFoundHttpException $exception)
* @param NotFoundHttpException $exception
* @return string
*/
public function getMessage(NotFoundHttpException $exception)
public function getNotFoundMessage(NotFoundHttpException $exception)
{
$message = !empty($exception->getMessage()) ? $exception->getMessage() : class_basename($exception);
if (basename($exception->getFile()) === 'RouteCollection.php') {
Expand Down

0 comments on commit be6f896

Please sign in to comment.