]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/APContact.php
Issue 8735: Ensure the correct data type for "hide"
[friendica.git] / src / Model / APContact.php
index 73c3ad85130d29dcb7bf0d2adf91000a5b9cde57..5966b8c25e2f80e7464db3bf5f2a57c6cac0bcfd 100644 (file)
@@ -295,6 +295,8 @@ class APContact
                                if (!empty($data['subscribe'])) {
                                        $apcontact['subscribe'] = $data['subscribe'];
                                }
+                       } else {
+                               $apcontact['addr'] = null;
                        }
                }
 
@@ -302,6 +304,10 @@ class APContact
                        $apcontact['baseurl'] = null;
                }
 
+               if (empty($apcontact['subscribe'])) {
+                       $apcontact['subscribe'] = null;
+               }               
+
                if (!empty($apcontact['baseurl']) && empty($fetched_contact['gsid'])) {
                        $apcontact['gsid'] = GServer::getID($apcontact['baseurl']);
                } elseif (!empty($fetched_contact['gsid'])) {