]> git.mxchange.org Git - friendica.git/commitdiff
Check for href existence for links in Protocol\PortableContact
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 29 May 2019 01:27:13 +0000 (21:27 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 29 May 2019 01:27:13 +0000 (21:27 -0400)
See https://github.com/friendica/friendica/issues/6918#issuecomment-495198587

src/Protocol/PortableContact.php

index b9c1533e6601365a53af1045fa66355895d998cd..5345cb22fce2ae182c6f155ab93e518138c08790 100644 (file)
@@ -665,7 +665,7 @@ class PortableContact
                $nodeinfo2_url = '';
 
                foreach ($nodeinfo['links'] as $link) {
-                       if (!is_array($link) || empty($link['rel'])) {
+                       if (!is_array($link) || empty($link['rel']) || empty($link['href'])) {
                                Logger::log('Invalid nodeinfo format for ' . $server_url, Logger::DEBUG);
                                continue;
                        }