]> git.mxchange.org Git - friendica.git/commitdiff
Only set the "updated" value when it contains a value
authorMichael <heluecht@pirati.ca>
Fri, 11 May 2018 10:44:28 +0000 (10:44 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 11 May 2018 10:44:28 +0000 (10:44 +0000)
src/Protocol/PortableContact.php

index 5a4436e372502e00dc0aacaa5e85cd476ad069d5..f824be40f0e8065c796035d3976f7fbec041c982 100644 (file)
@@ -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)) {