From 8b5b66838dfb653efd24dc4a49bce166de9c728e Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 13 Jan 2019 16:00:27 +0000 Subject: [PATCH] Issue 6438: Avoid fatal error --- src/Util/JsonLD.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Util/JsonLD.php b/src/Util/JsonLD.php index e2c2dddc1b..062fb00cd4 100644 --- a/src/Util/JsonLD.php +++ b/src/Util/JsonLD.php @@ -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'])) {