Avoiding warning 'PHP Notice: Undefined index: updated' (#1392)

Avoiding warning 'PHP Notice: Undefined index: updated'
This commit is contained in:
ArthurHoaro 2020-01-12 15:22:02 +01:00 committed by GitHub
commit 7d0db8b567
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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}