ErrorException [ Notice ]: Trying to get property 'viewtype' of non-object

APPPATH/classes/controller/page.php [ 121 ]

116 		$page   = R::findOne( "kategori", "slugen=?", array($this->id) );
117 		$ln = $this->lang;
118 		$viewtypes = R::findAll("viewtypes");
119 		$pro = $this->request->param('pro');
120 		$p;
121 		$table = ($page->viewtype == 2) ? "products" : "kategori";
122 
123 		
124 
125 		if(!strlen($pro)){
126 
  1. APPPATH/classes/controller/page.php [ 121 ] » Kohana_Core::error_handler(arguments)

  2. {PHP internal call} » Controller_Page->action_products()

  3. SYSPATH/classes/kohana/request/client/internal.php [ 118 ] » ReflectionMethod->invoke(arguments)

  4. SYSPATH/classes/kohana/request/client.php [ 64 ] » Kohana_Request_Client_Internal->execute_request(arguments)

  5. SYSPATH/classes/kohana/request.php [ 1138 ] » Kohana_Request_Client->execute(arguments)

  6. DOCROOT/index.php [ 111 ] » Kohana_Request->execute()

Environment