ErrorException [ Warning ]: Attempt to assign property 'canonical_url' of non-object

APPPATH/classes/HTTP/Exception/404.php [ 167 ]

162         //$this->template->canonical_url = NULL;
163 
164         $test_canonical = explode('?',$_SERVER['REQUEST_URI']);
165         if(isset($test_canonical[1]) && strlen($test_canonical[1]) > 0)
166         {
167             $this->template->canonical_url = $test_canonical[0];
168         }
169 
170         //$this->template->breadcrumbs = array();
171         //$this->template->content = NULL;
172 
  1. APPPATH/classes/HTTP/Exception/404.php [ 167 ] » Kohana_Core::error_handler(arguments)

  2. SYSPATH/classes/Kohana/Request.php [ 990 ] » HTTP_Exception_404->get_response()

  3. DOCROOT/public/index.php [ 136 ] » Kohana_Request->execute()

Environment