Unhandled Error!

Trying to get property of non-object

Document Vendor
Document type CMS page POST action code
Line 1
Exception class Cms_ExecutionException

Code Highlight

Cms_VisitorPreferences::set('manufacturer_id', $manufacturer->id);
 
  $category_id = Cms_VisitorPreferences::get('category_id');
 
  if($category_id) {
    $category = Shop_Category::create()->find($category_id);
 
    $parent_category = $category;
 
    foreach($category->get_parents(true) as $i => $v)
      if($v && !$v->get_parent())
        $parent_category = $v;
 
# Document Type
1 Vendor CMS page POST action code