]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #6439 from annando/issue-6438
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 13 Jan 2019 16:06:52 +0000 (17:06 +0100)
committerGitHub <noreply@github.com>
Sun, 13 Jan 2019 16:06:52 +0000 (17:06 +0100)
Issue 6438: Avoid fatal error

src/Util/JsonLD.php

index e2c2dddc1b957eb1b3d6096d5e26cc34b904b567..062fb00cd44768f99f23cc2c8bbb516899de2fb0 100644 (file)
@@ -95,7 +95,9 @@ class JsonLD
 
                // Workaround for Nextcloud Social
                // See issue https://github.com/nextcloud/social/issues/330
-               $json['@context'][] = 'https://w3id.org/security/v1';
+               if (is_array($json['@context'])) {
+                       $json['@context'][] = 'https://w3id.org/security/v1';
+               }
 
                // Trying to avoid memory problems with large content fields
                if (!empty($json['object']['source']['content'])) {