]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix: Contact wasn't added on probing
authorMichael <heluecht@pirati.ca>
Mon, 30 Apr 2018 16:45:00 +0000 (16:45 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 30 Apr 2018 16:45:00 +0000 (16:45 +0000)
src/Network/Probe.php

index d14c623e864b7f6df93407f1fc52f21bbbd86ab5..6e7e21d1e90c36ac04d6587a63230813c29c7840 100644 (file)
@@ -444,6 +444,11 @@ class Probe
 
                                $old_fields = dba::selectFirst('contact', $fieldnames, $condition);
 
+                               // When the contact doesn't exist, the value "true" will trigger an insert
+                               if (!$old_fields) {
+                                       $old_fields = true;
+                               }
+
                                dba::update('contact', $fields, $condition, $old_fields);
                        }
                }