Unhandled Error!

Trying to get property of non-object

Document Resources Category
Document type CMS page
Line 1
Exception class Cms_ExecutionException

Code Highlight

<? $this->page->description = preg_replace('/<[^>]*>/', '', $category->description); ?>
<h2 class="ttu">Sydney <?= $category->name ?></h2>
<p><?= $category->description; ?></p>
 
<? foreach ($post_list as $post): ?>
    <? if ($post->categories->code != 'case-studies') : ?>
        <hr />
 
        <? if ( isset($post->featuredimages_calculated) ) : ?>
            <div class="row">
                <div class="three columns">
                        <? $image_file = Db_File::create()->where('master_object_id = '.$post->id.' AND master_object_class = "Blog_Post"')->find_all()->limit(1);
                        $image_path = $image_file->getThumbnailPath('150', '150', true, array('mode'=>'crop')); ?>
# Document Type
1 Resources Category CMS page