Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
piotrpawlowski
tagDiv Member

That is the solution:

// datePublished
$td_article_date_unix = get_post_datetime( $this->post, ‘date’, ‘gmt’ );
if ($td_article_date_unix)
$buffy .= ‘<meta itemprop=”datePublished” content=”‘ . $td_article_date_unix->format( DATE_W3C ) . ‘”>’;

// dateModified – local time
$td_article_modified_date_unix = get_post_datetime( $this->post, ‘modified’, ‘gmt’ );
if ($td_article_modified_date_unix)
$buffy .= ‘<meta itemprop=”dateModified” content=”‘ . $td_article_modified_date_unix->format( DATE_W3C ) . ‘”>’;

lines: 670 – 678.

Function get_post_datetime returns false when post’s datetime is not set (that’s why this error occurs only in preview mode). And then you call format() method on boolean value: $td_article_date_unix->format.

Please fix it in next release.

Viewing 1 post (of 1 total)