]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/PortableContact.php
The endless saga of the fight against notices continues
[friendica.git] / src / Protocol / PortableContact.php
index 1c44947f58052823a0a28598341f2a1fa76b977a..2939f69e55c2cbe42727cd76e7b41952df811bda 100644 (file)
@@ -1157,9 +1157,9 @@ class PortableContact
 
                                if (isset($data['version'])) {
                                        $platform = "Mastodon";
-                                       $version = $data['version'];
-                                       $site_name = $data['title'];
-                                       $info = $data['description'];
+                                       $version = defaults($data, 'version', '');
+                                       $site_name = defaults($data, 'title', '');
+                                       $info = defaults($data, 'description', '');
                                        $network = Protocol::OSTATUS;
                                }
 
@@ -1472,7 +1472,7 @@ class PortableContact
                        $tags = [];
                        foreach ($data['tags'] as $tag) {
                                $tag = mb_strtolower($tag);
-                               if (count($tag) < 100) {
+                               if (strlen($tag) < 100) {
                                        $tags[$tag] = $tag;
                                }
                        }