Unhandled Error!

Trying to get property of non-object

Document random_blog
Document type CMS partial
Line 10
Exception class Cms_ExecutionException

Code Highlight

<? shuffle($x_catblogposts) ?>
<? foreach( $x_catblogposts as $x_catblogpost ) : ?>
<? $post = Blog_Post::create()->find_by_id($x_catblogpost); ?>
			<? if(isset($post->featuredimages[0])) : ?>
			<a href="<?php echo site_url("/blog/post/$post->url_title"); ?>/" data-gtm='B: <?php echo $post->title; ?> (C)'><img src="<?= $post->featuredimages[0]->getThumbnailPath('auto', 370, true) ?>" loading="eager" alt="<?php echo $post->title; ?>" width="100%" height="100%">
			<? endif; ?>
			<h2><?php echo $post->title; ?></h2>
			<p>
			<? $post->description = strip_tags($post->description);
	if (strlen($post->description) > 70) {
    // truncate string
    $stringCut = substr($post->description, 0, 70);
    $endPoint = strrpos($stringCut, ' ');
# Document Type
2 random_blog CMS partial
1 Grass Care Equipment Hire CMS page