From 79a343a69ae93e3bbc319803d8b5b5c94ef410eb Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 11 May 2018 10:44:28 +0000 Subject: [PATCH] Only set the "updated" value when it contains a value --- src/Protocol/PortableContact.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index 5a4436e37..f824be40f 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -522,7 +522,12 @@ class PortableContact } } - $fields = ['updated' => $last_updated, 'last_contact' => DateTimeFormat::utcNow()]; + $fields = ['last_contact' => DateTimeFormat::utcNow()]; + + if (!empty($last_updated)) { + $fields['updated'] = $last_updated; + } + dba::update('gcontact', $fields, ['nurl' => normalise_link($profile)]); if (($gcontacts[0]["generation"] == 0)) {