]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/JsonLD.php
Catch exceptions for Worker::AddContact()
[friendica.git] / src / Util / JsonLD.php
index e8c4751c4387266eba55eb35b84b0192a04e3444..732b4b985d4d5bdabde47d1891652bbb893cbdec 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -24,6 +24,7 @@ namespace Friendica\Util;
 use Friendica\Core\Cache\Enum\Duration;
 use Friendica\Core\Logger;
 use Exception;
+use Friendica\Core\System;
 use Friendica\DI;
 
 /**
@@ -69,7 +70,7 @@ class JsonLD
 
                if ($recursion > 5) {
                        Logger::error('jsonld bomb detected at: ' . $url);
-                       exit();
+                       System::exit();
                }
 
                $result = DI::cache()->get('documentLoader:' . $url);
@@ -139,7 +140,9 @@ class JsonLD
                        'toot' => (object)['@id' => 'http://joinmastodon.org/ns#', '@type' => '@id'],
                        'litepub' => (object)['@id' => 'http://litepub.social/ns#', '@type' => '@id'],
                        'sc' => (object)['@id' => 'http://schema.org#', '@type' => '@id'],
-                       'pt' => (object)['@id' => 'https://joinpeertube.org/ns#', '@type' => '@id']];
+                       'pt' => (object)['@id' => 'https://joinpeertube.org/ns#', '@type' => '@id'],
+                       'mobilizon' => (object)['@id' => 'https://joinmobilizon.org/ns#', '@type' => '@id'],
+               ];
 
                // Preparation for adding possibly missing content to the context
                if (!empty($json['@context']) && is_string($json['@context'])) {