Skip to content

Commit

Permalink
Add 404 error message to user session, so it can be easily retrieved …
Browse files Browse the repository at this point in the history
…later

404 message can't be retrieved in prod env.
  • Loading branch information
j0k3r committed May 3, 2013
1 parent 64232a8 commit 79417d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/action/sfAction.class.php
Expand Up @@ -536,6 +536,11 @@ public function getRoute()
*/
protected function get404Message($message = null)
{
if (!sfConfig::get('sf_debug') && null !== $message)
{
$this->getUser()->setFlash('404_message', $message);
}

return null === $message ? sprintf('This request has been forwarded to a 404 error page by the action "%s/%s".', $this->getModuleName(), $this->getActionName()) : $message;
}
}

0 comments on commit 79417d5

Please sign in to comment.