Unhandled Error!

Trying to get property of non-object

Document Displays a blog post.
Document type CMS page
Line 4
Exception class Cms_ExecutionException

Code Highlight

<?
// Set column widths for newer posts
$oldPost = true;
if ($post->published_date) {
	$pubDate=$post->published_date->format('%F');
} else {
	$pubDate=strftime('%F', $_SERVER['REQUEST_TIME']);
}
$postDate=strtotime($pubDate);
$testDate=strtotime("May 30, 2015");
if($postDate < $testDate) {
	$oldPost = true;
} else {
# Document Type
1 Displays a blog post. CMS page