Avoiding warning 'PHP Notice: Undefined index: updated'

This commit is contained in:
Lucas Cimon 2020-01-12 14:54:48 +01:00
parent 74c1d02079
commit d9bfceaddf
2 changed files with 2 additions and 2 deletions

View file

@ -27,7 +27,7 @@
{/if}
{if="!$hide_timestamps || $is_logged_in"}
<meta property="article:published_time" content="{$link.created->format(DateTime::ATOM)}" />
{if="$link.updated"}
{if="!empty($link.updated)"}
<meta property="article:modified_time" content="{$link.updated->format(DateTime::ATOM)}" />
{/if}
{/if}

View file

@ -24,7 +24,7 @@
{/if}
{if="!$hide_timestamps || $is_logged_in"}
<meta property="article:published_time" content="{$link.created->format(DateTime::ATOM)}" />
{if="$link.updated"}
{if="!empty($link.updated)"}
<meta property="article:modified_time" content="{$link.updated->format(DateTime::ATOM)}" />
{/if}
{/if}