]> git.mxchange.org Git - friendica.git/commitdiff
Issue 6438: Avoid fatal error
authorMichael <heluecht@pirati.ca>
Sun, 13 Jan 2019 16:00:27 +0000 (16:00 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 13 Jan 2019 16:00:27 +0000 (16:00 +0000)
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'])) {