]> git.mxchange.org Git - friendica.git/commitdiff
Use expected return variable type in Network\Probe::detect
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 3 Jun 2020 03:41:10 +0000 (23:41 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 3 Jun 2020 03:41:10 +0000 (23:41 -0400)
src/Network/Probe.php

index cef8ec64b28005ffd9e20e72c5c154a1d57c5f7f..da6106a39a1708fe249f4769fde302a259040770 100644 (file)
@@ -674,7 +674,7 @@ class Probe
                        $addr = $uri;
                } else {
                        Logger::log("Uri ".$uri." was not detectable", Logger::DEBUG);
-                       return false;
+                       return [];
                }
 
                $webfinger = false;
@@ -716,7 +716,7 @@ class Probe
                        return self::feed($uri);
                }
 
-               $result = false;
+               $result = [];
 
                Logger::info("Probing", ['uri' => $uri]);
 
@@ -767,6 +767,7 @@ class Probe
                                $result["baseurl"] = substr($result["url"], 0, $pos).$host;
                        }
                }
+
                return $result;
        }