Unhandled Error!

Call to a member function format() on null

Document /modules/cms/classes/cms_controller.php(383) : eval()'d code
Document type PHP document
Line 30
Exception class Error
# Call Stack Code Document Line
14 eval(()) /modules/cms/classes/cms_controller.php 383
13 Cms_Controller->evalWithException('?><? if($product->related_blog_posts->count > 0): ?> <div class="news-scroller blog py-50"> <div class="text-center pb-25"> <div class="h1 pb-10">Related Articles</div> <a href="/blog">View all blog articles</a> </div> <div class="blog-posts-home"> <div id="blog-posts" class="home-blog-posts owl-carousel owl-theme"> <? foreach ($product->related_blog_posts as $i=> $post): $thumbnail = "https://placehold.it/1440x500?text=No+Image+Available"; if(isset($post->featuredimages[0])) { $thumbnail = $post->featuredimages[0]->getThumbnailPath('auto', 'auto', false); } ?> <div class="blog-post"> <a href="<?= root_url('blog/post/'.$post->url_title); ?>" class="blogimage blog-post-image lazyload" style="background-image: url();" data-src="<?= $thumbnail ?>"></a> <div class="blog-post-content"> <div class="blog-post-categories"> <? foreach($post->categories as $i=>$category): ?> <a class="blog-post-link" href="<?= root_url('blog/category/'.$category->url_name); ?>"><?= $category->name; ?></a> <?= $i == $post->categories->count - 1 ? '' : ', '; ?> <? endforeach; ?> </div> <h3 class="h3 blog-post-title"><a href="<?= root_url('blog/post/'.$post->url_title); ?>"><?= h($post->title); ?></a></h3> <p class="blog-post-shortdesc"><?= h($post->description); ?></p> </div> <div class="blog-post-footer"> <span class="blog-post-link" href="<?= root_url('blog/post/'.$post->url_title); ?>">Posted <?= $post->published_date->format('%d %b %Y') ?></span> <? $this->render_partial('blog:share_this', array( 'post'=>$post, 'page_title'=>$post->title, 'page_url'=>root_url('blog/post/'.$post->url_title,true) )); ?> </div> </div> <? endforeach; ?> </div> </div> </div> <? endif; ?>', 'CMS partial', 'shop:product_blogposts', array(0)) /modules/cms/classes/cms_controller.php 1020
12 Cms_Controller->render_partial('shop:product_blogposts', array(0), array(4) [cache => '1', cache_ttl => '604800', cache_vary_by => array(1), cache_versions => array(1)]) /modules/cms/classes/cms_controller.php(383) : eval()'d code 46
11 eval(()) /modules/cms/classes/cms_controller.php 383
10 Cms_Controller->evalWithException('?><? $this->render_partial('snippet:usp_primary'); ?> <div class="product-page"> <? /** * Display error if we don't have the object or * is out of stock, 'Track Inventory' and 'Hide if Out Of Stock' is enabled * */ if(!$product || !isset($product)): ?> <div class="container"> <div class="row"> <div class="col-xs-24 text-center"> <div class="error not-found"> <h2>Product not found</h2> <p>It seems the requested product was not found.</p> <p>Don't worry we have <a href="<?=root_url('/store/'); ?>" title="continue shopping"><strong>loads more for you to see</strong></a></p> </div><!-- /.not-found --> </div><!-- /.col-* --> </div><!-- /.row --> </div><!-- /.container --> <? /** * Display unavilable message if the product is unavailable * */ elseif($product_unavailable): ?> <div class="container"> <div class="row"> <div class="col-xs-24"> <div class="error unavailable"> <h2>Product unavailble</h2> <p>This product is currently unavailable, it maye be restocked at a later date.</p> <p>Don't worry we have <a href="<?=root_url('/store/'); ?>" title="continue shopping"><strong>loads more for you to see</strong></a></p> </div><!-- /.unavailable--> </div><!-- /.col-* --> </div><!-- /.row --> </div><!-- /.container --> <? else: ?> <div id="product-page"> <? $this->render_partial('shop:product'); ?> </div> <? $this->render_partial('shop:product_blogposts', [], [ 'cache'=> true, 'cache_ttl'=> 604800, // Recache every 1 week 'cache_vary_by'=> array('url'), 'cache_versions'=> array('catalog'), ]); ?> <? endif; ?> </div><!-- /.product-page --> <? $this->render_partial('snippet:usp'); ?>', 'CMS page', 'Wall Mounted Scissor Boom') /modules/cms/classes/cms_controller.php 608
9 Cms_Controller->eval_page_content(()) /modules/cms/classes/cms_controller.php 198
8 Cms_Controller->open(object(Cms_Page), array(1) [0 => 'pixapro-wall-mounted-scissor-boom']) /controllers/application.php 72
7 Application->On404(()) /phproad/modules/phpr/classes/phpr_controller.php 170
6 Phpr_Controller->executeAction('On404', array(0)) /phproad/modules/phpr/classes/phpr_controller.php 84
5 Phpr_Controller->_run('On404', array(0)) /phproad/modules/phpr/classes/phpr_response.php 64
4 Phpr_Response->open404(()) /phproad/modules/phpr/classes/phpr_response.php 37
3 Phpr_Response->open('/product/pixapro-wall-mounted-scissor-boom') /phproad/system/phproad.php 31
2 include('/var/www/vhosts/essentialphoto.co.uk/httpdocs/phproad/system/phproad.php') /boot.php 117
1 require_once('/var/www/vhosts/essentialphoto.co.uk/httpdocs/boot.php') /index.php 3