]> git.mxchange.org Git - friendica.git/blobdiff - src/Console/Contact.php
Fix: Prevent an endless loop when fetching quoted content
[friendica.git] / src / Console / Contact.php
index f051d870a295c8710a72f21a7b7c57992fc3f486..a80b88349a157bc99bfca55bbc720be1fbb74061 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -76,7 +76,7 @@ HELP;
                $this->appMode = $appMode;
        }
 
-       protected function doExecute()
+       protected function doExecute(): int
        {
                if ($this->getOption('v')) {
                        $this->out('Class: ' . __CLASS__);
@@ -157,7 +157,7 @@ HELP;
 
                $url = Probe::cleanURI($url);
 
-               $contact = ContactModel::getByURLForUser($url, $user['uid']);
+               $contact = ContactModel::getByURL($url, null, [], $user['uid']);
                if (!empty($contact)) {
                        throw new RuntimeException('Contact already exists');
                }