Unhandled Error!

Trying to get property of non-object

Document piercing:bcrumbs_prod
Document type CMS partial
Line 18
Exception class Cms_ExecutionException

Code Highlight

     if (!isset($root)) :
     $params = array();
     $root = Cms_Page::findByUrl('/', $params);
  endif ?>
<?
     $cat_code = $this->request_param(1,"");
     $pcat = ($cat_code == "" ? pcategory($product->category_list) :       Shop_Category::create()->find_by_code($cat_code));
   ?>
<?
          $parents = $pcat->get_parents(true);
           $i = 1;
           $n = count($parents);
          ?>
# Document Type
2 piercing:bcrumbs_prod CMS partial
1 Product - Piercing shop CMS template