]> git.mxchange.org Git - friendica.git/commitdiff
Account for missing contact in dfrn_request_post
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 13 Dec 2020 17:18:10 +0000 (12:18 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 13 Dec 2020 17:18:10 +0000 (12:18 -0500)
- Address https://github.com/friendica/friendica/issues/9250#issuecomment-743407998

mod/dfrn_request.php
src/Network/Probe.php

index 3f784015ddccc2660e216826542b329cae259c27..47478d384833823639ea19a6609c9333eb690bc3 100644 (file)
@@ -299,7 +299,7 @@ function dfrn_request_post(App $a)
                $network = $data["network"];
 
                // Canonicalize email-style profile locator
-               $url = Probe::webfingerDfrn($data['url'], $hcard);
+               $url = Probe::webfingerDfrn($data['url'] ?? $url, $hcard);
 
                if (substr($url, 0, 5) === 'stat:') {
                        // Every time we detect the remote subscription we define this as OStatus.
index 67db29a4f3536fe9b0e98332de9578ac55db8b8a..d5dcba529596ab1176dca5f657725abd04b07f25 100644 (file)
@@ -258,7 +258,7 @@ class Probe
         * @return string profile link
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function webfingerDfrn($webbie, &$hcard_url)
+       public static function webfingerDfrn(string $webbie, string &$hcard_url)
        {
                $profile_link = '';