diff --git a/src/Module/Admin/Site.php b/src/Module/Admin/Site.php
index ef7d5b9871..a6e73cea4a 100644
--- a/src/Module/Admin/Site.php
+++ b/src/Module/Admin/Site.php
@@ -388,10 +388,6 @@ class Site extends BaseAdmin
/* Banner */
$banner = DI::config()->get('system', 'banner');
- if ($banner == false) {
- $banner = 'Friendica';
- }
-
$email_banner = DI::config()->get('system', 'email_banner');
if ($email_banner == false) {
diff --git a/src/Module/Update/Display.php b/src/Module/Update/Display.php
index 4b84cba7a8..9f149d7dc8 100644
--- a/src/Module/Update/Display.php
+++ b/src/Module/Update/Display.php
@@ -59,9 +59,9 @@ class Display extends DisplayModule
$parentUriId = $item['parent-uri-id'];
if (empty($force)) {
- $browserUpdate = $this->pConfig->get($profileUid, 'system', 'update_interval');
- if (!empty($browserUpdate)) {
- $updateDate = date(DateTimeFormat::MYSQL, time() - (intval($browserUpdate) / 500));
+ $browserUpdate = intval($this->pConfig->get($profileUid, 'system', 'update_interval') ?? 40000);
+ if ($browserUpdate >= 1000) {
+ $updateDate = date(DateTimeFormat::MYSQL, time() - ($browserUpdate * 2 / 1000));
if (!Post::exists([
"`parent-uri-id` = ? AND `uid` IN (?, ?) AND `received` > ?",
$parentUriId, 0,
diff --git a/src/Object/Api/Mastodon/Status.php b/src/Object/Api/Mastodon/Status.php
index 2889388558..eae53ef4a9 100644
--- a/src/Object/Api/Mastodon/Status.php
+++ b/src/Object/Api/Mastodon/Status.php
@@ -114,7 +114,7 @@ class Status extends BaseDataTransferObject
$visibility = ['public', 'private', 'unlisted'];
$this->visibility = $visibility[$item['private']];
- $languages = json_decode($item['language'], true);
+ $languages = json_decode($item['language'] ?? '', true);
if (is_array($languages)) {
reset($languages);
$this->language = key($languages);
diff --git a/src/Util/JsonLD.php b/src/Util/JsonLD.php
index 25ce74fcc7..51d15cb10a 100644
--- a/src/Util/JsonLD.php
+++ b/src/Util/JsonLD.php
@@ -140,7 +140,7 @@ class JsonLD
* @return array Compacted JSON array
* @throws Exception
*/
- public static function compact($json, bool $logfailed = true)
+ public static function compact($json, bool $logfailed = true): array
{
jsonld_set_document_loader('Friendica\Util\JsonLD::documentLoader');
@@ -203,6 +203,11 @@ class JsonLD
$json = json_decode(json_encode($compacted, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), true);
+ if ($json === false) {
+ Logger::notice('JSON encode->decode failed', ['orig_json' => $orig_json, 'compacted' => $compacted]);
+ $json = [];
+ }
+
return $json;
}
diff --git a/static/settings.config.php b/static/settings.config.php
index 3ec7fef9b7..4cebd0955b 100644
--- a/static/settings.config.php
+++ b/static/settings.config.php
@@ -64,6 +64,10 @@ return [
// Themes users can change to in their settings.
'allowed_themes' => 'frio,vier',
+ // banner (HTML string)
+ // HTML snippet of the top navigation banner. Not supported by frio.
+ 'banner' => 'Friendica',
+
// cache_contact_avatar (Boolean)
// Cache versions of the contact avatars. Uses a lot of storage space
'cache_contact_avatar' => true,