]> git.mxchange.org Git - friendica.git/commitdiff
Issue 11602: Fix error during contact merhe
authorMichael <heluecht@pirati.ca>
Sun, 5 Jun 2022 18:15:10 +0000 (18:15 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 5 Jun 2022 18:15:10 +0000 (18:15 +0000)
src/Console/MergeContacts.php
src/Module/Notifications/Ping.php
view/lang/C/messages.po

index 79cd0b4b749ae431e49e6cb22f904f077e2eb4ad..543ad316e7f9fc48c3f92589282c1e9c9e58095a 100644 (file)
@@ -73,6 +73,10 @@ HELP;
                while ($duplicate = $this->dba->fetch($duplicates)) {
                        $this->out($this->l10n->t('%d %s, %d duplicates.', $duplicate['uri-id'], $duplicate['url'], $duplicate['total']));
                        if ($this->getOption(['e', 'execute'], false)) {
+                               if (empty($duplicate['uri-id'])) {
+                                       $this->err($this->l10n->t('uri-id is empty for contact %s.', $duplicate['url']));
+                                       continue;
+                               }
                                $this->mergeContacts($duplicate['uri-id']);
                        }
                }
index 7dc215826024dd0ccfa6a5b17c631542fec5c9db..6dfb2db5af21856a5a7958d237c924e20e553290 100644 (file)
@@ -92,7 +92,7 @@ class Ping extends BaseModule
                        } else {
                                $notifications = $this->notificationRepo->selectDigestForUser(local_user());
                        }
-
+                       $this->logger->info('Blubb-1', ['uid' => local_user(), 'count' => count($notifications)]);
                        $condition = [
                                "`unseen` AND `uid` = ? AND NOT `origin` AND (`vid` != ? OR `vid` IS NULL)",
                                local_user(), Verb::getID(Activity::FOLLOW)
@@ -200,7 +200,7 @@ class Ping extends BaseModule
                                }
                        }, $notifications->getArrayCopy());
                        $navNotifications = array_filter($navNotifications);
-
+                       $this->logger->info('Blubb-2', ['uid' => local_user(), 'count' => count($navNotifications)]);
                        $sysnotify_count = array_reduce($navNotifications, function (int $carry, ValueObject\FormattedNavNotification $navNotification) {
                                return $carry + ($navNotification->seen ? 0 : 1);
                        }, 0);
index fff804f3a9e5f0b8838f885697be2bc4abb76515..9e73d60a3a638e4dca0a211f8c642320c3fee0ca 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 2022.05-rc\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-06-05 11:15+0000\n"
+"POT-Creation-Date: 2022-06-05 18:14+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1646,53 +1646,58 @@ msgstr ""
 msgid "%d %s, %d duplicates."
 msgstr ""
 
-#: src/Console/MergeContacts.php:86
+#: src/Console/MergeContacts.php:77
+#, php-format
+msgid "uri-id is empty for contact %s."
+msgstr ""
+
+#: src/Console/MergeContacts.php:90
 #, php-format
 msgid "No valid first countact found for uri-id %d."
 msgstr ""
 
-#: src/Console/MergeContacts.php:97
+#: src/Console/MergeContacts.php:101
 #, php-format
 msgid "Wrong duplicate found for uri-id %d in %d (url: %s != %s)."
 msgstr ""
 
-#: src/Console/MergeContacts.php:101
+#: src/Console/MergeContacts.php:105
 #, php-format
 msgid "Wrong duplicate found for uri-id %d in %d (nurl: %s != %s)."
 msgstr ""
 
-#: src/Console/MergeContacts.php:137
+#: src/Console/MergeContacts.php:141
 #, php-format
 msgid "Deletion of id %d failed"
 msgstr ""
 
-#: src/Console/MergeContacts.php:139
+#: src/Console/MergeContacts.php:143
 #, php-format
 msgid "Deletion of id %d was successful"
 msgstr ""
 
-#: src/Console/MergeContacts.php:145
+#: src/Console/MergeContacts.php:149
 #, php-format
 msgid "Updating \"%s\" in \"%s\" from %d to %d"
 msgstr ""
 
-#: src/Console/MergeContacts.php:147
+#: src/Console/MergeContacts.php:151
 msgid " - found"
 msgstr ""
 
-#: src/Console/MergeContacts.php:154
+#: src/Console/MergeContacts.php:158
 msgid " - failed"
 msgstr ""
 
-#: src/Console/MergeContacts.php:156
+#: src/Console/MergeContacts.php:160
 msgid " - success"
 msgstr ""
 
-#: src/Console/MergeContacts.php:160
+#: src/Console/MergeContacts.php:164
 msgid " - deleted"
 msgstr ""
 
-#: src/Console/MergeContacts.php:163
+#: src/Console/MergeContacts.php:167
 msgid " - done"
 msgstr ""