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

MODPATH/shop/classes/controller/shop/product.php [ 156 ]

151        
152 		$category = Arr::get($categories, $category_id, current($categories));
153 		if($model_products->remain<=0&&!$category->show)
154 			throw new HTTP_Exception_404;
155 		$this->view->category_recordset = $category;
156 		$category_id = $category->id;
157 		$shop = Shop::instance();
158 		$shop->category($category_id);
159 		$categories_parents = $category->parents(false, true);
160 
161 		$categories_title = join(' | ', $categories_parents->as_array(null, 'name'));
  1. MODPATH/shop/classes/controller/shop/product.php [ 156 ] » Kohana_Core::error_handler(arguments)

  2. {PHP internal call} » Controller_Shop_Product->action_view(arguments)

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

  4. SYSPATH/classes/kohana/request.php [ 1129 ] » Kohana_Request_Client_Internal->execute(arguments)

  5. APPPATH/classes/controller/alias.php [ 37 ] » Kohana_Request->execute()

  6. {PHP internal call} » Controller_Alias->action_index(arguments)

  7. SYSPATH/classes/kohana/request/client/internal.php [ 132 ] » ReflectionMethod->invokeArgs(arguments)

  8. SYSPATH/classes/kohana/request.php [ 1129 ] » Kohana_Request_Client_Internal->execute(arguments)

  9. DOCROOT/core/bootstrap.php [ 159 ] » Kohana_Request->execute()

  10. DOCROOT/index.php [ 45 ] » require_once(arguments)

Environment