Unhandled Error!

Trying to get property of non-object

Document tts_sidebar_categories
Document type CMS partial
Line 2
Exception class Cms_ExecutionException

Code Highlight

  <?
    $cat_env = ($category->category_id == null ? $category->id : $category->category_id);
 
  if($cat_env == null) {
    $cat_env = $product->find_products('category_ids');
 
    echo $cat_env;
 
  }
 
  $boom = Shop_Category::create()->where('id = '. $cat_env)->find_all();
    $subcategories = $boom->list_children('front_end_sort_order');
 
# Document Type
2 tts_sidebar_categories CMS partial
1 Category CMS page