Unhandled Error!

Trying to get property of non-object

Document Category
Document type CMS page
Line 1
Exception class Cms_ExecutionException

Code Highlight

<? 	$category = Shop_Category::create(true)->find_by_id($category->id);
	$banner = isset($banner) ? $banner : 'main_banner';
	$image = $category->$banner->getThumbnailPath(2200, 'auto');
	if($image):
?>
	<div class="banner-wrap">
		<? $this->render_partial('site:get_cat_banner', array('banner'=>'main_banner')); ?>
	</div>
<? endif; ?>
 
<div class="container wide pagearea <? if($image): echo "category-wrap"; endif; ?>">
	<?php $this->render_partial('site:breadcrumbs');?>
	<? if(!$category): ?>
# Document Type
1 Category CMS page