Permalink
Browse files

Merge branch '3.1/develop' into 3.2/develop

refs #4553
  • Loading branch information...
2 parents c2581f3 + a73ea67 commit be7dfa5d2613641785aeb19cf716614e37274c24 @Zeelot Zeelot committed Jun 6, 2012
Showing with 9 additions and 9 deletions.
  1. +9 −9 guide/kohana/tutorials/error-pages.md
@@ -16,7 +16,7 @@ Our custom exception handler is self explanatory.
public static function handler(Exception $e)
{
- if (Kohana::DEVELOPMENT === Kohana::$environment)
+ if (Kohana::$environment === Kohana::DEVELOPMENT)
{
parent::handler($e);
}
@@ -26,22 +26,22 @@ Our custom exception handler is self explanatory.
{
Kohana::$log->add(Log::ERROR, parent::text($e));
- $attributes = array
+ $params = array
(
'action' => 500,
'message' => rawurlencode($e->getMessage())
);
if ($e instanceof HTTP_Exception)
{
- $attributes['action'] = $e->getCode();
+ $params['action'] = $e->getCode();
}
// Error sub-request.
- echo Request::factory(Route::get('error')->uri($attributes))
- ->execute()
- ->send_headers()
- ->body();
+ echo Request::factory(Route::get('error')->uri($params))
+ ->execute()
+ ->send_headers()
+ ->body();
}
catch (Exception $e)
{
@@ -92,10 +92,10 @@ would display an error 500 page.
{
parent::before();
- $this->template->page = URL::site(rawurldecode(Request::$initial->uri()));
+ $this->template->page = URL::site(rawurldecode(Request::initial()->uri()));
// Internal request only!
- if (Request::$initial !== Request::$current)
+ if ( ! Request::current()->is_initial())
{
if ($message = rawurldecode($this->request->param('message')))
{

0 comments on commit be7dfa5

Please sign in to comment.