]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/GServer.php
Standards
[friendica.git] / src / Model / GServer.php
index 6a1a363e34f96580d991d74b6a8294e2d63715fd..7e1d178ddfe1bf6986f36cc9464b00b95f165148 100644 (file)
@@ -802,6 +802,7 @@ class GServer
        /**
         * Parses Nodeinfo 2
         *
+        * @see https://git.feneas.org/jaywink/nodeinfo2
         * @param string $nodeinfo_url address of the nodeinfo path
         * @return array Server data
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
@@ -850,7 +851,9 @@ class GServer
                if (!empty($nodeinfo['protocols'])) {
                        $protocols = [];
                        foreach ($nodeinfo['protocols'] as $protocol) {
-                               $protocols[$protocol] = true;
+                               if (is_string($protocol)) {
+                                       $protocols[$protocol] = true;
+                               }
                        }
 
                        if (!empty($protocols['dfrn'])) {