]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/OnePoll.php
Merge pull request #5780 from annando/fix-relocation
[friendica.git] / src / Worker / OnePoll.php
index 7f60ddc56898bbd754f139453f33367532f12f24..01b63e98e03a494478dca3fb00995562c49aa642 100644 (file)
@@ -607,12 +607,15 @@ class OnePoll
                        if (strlen($hub) && $hub_update && (($contact['rel'] != Contact::FOLLOWER) || $contact['network'] == Protocol::FEED)) {
                                logger('hub ' . $hubmode . ' : ' . $hub . ' contact name : ' . $contact['name'] . ' local user : ' . $importer['name']);
                                $hubs = explode(',', $hub);
+
                                if (count($hubs)) {
                                        foreach ($hubs as $h) {
                                                $h = trim($h);
+
                                                if (!strlen($h)) {
                                                        continue;
                                                }
+
                                                subscribe_to_hub($h, $importer, $contact, $hubmode);
                                        }
                                }
@@ -652,7 +655,7 @@ class OnePoll
         * @param array $contact The personal contact entry
         * @param array $fields The fields that are updated
         */
-       private static function updateContact($contact, $fields)
+       private static function updateContact(array $contact, array $fields)
        {
                DBA::update('contact', $fields, ['id' => $contact['id']]);
                DBA::update('contact', $fields, ['uid' => 0, 'nurl' => $contact['nurl']]);