From: Hypolite Petovan Date: Sun, 7 May 2023 03:48:32 +0000 (-0400) Subject: Prevent casting a non-existent array key before it's been coalesced in Model\GServer X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=29329f799d1b85780df8b10b98daa6de4006a258;p=friendica.git Prevent casting a non-existent array key before it's been coalesced in Model\GServer - Address https://github.com/friendica/friendica/issues/13025#issuecomment-1536440077 --- diff --git a/src/Model/GServer.php b/src/Model/GServer.php index 11d3227e8a..758ff0f135 100644 --- a/src/Model/GServer.php +++ b/src/Model/GServer.php @@ -869,7 +869,7 @@ class GServer } // Sanitize incoming data, see https://github.com/friendica/friendica/issues/8565 - $data['subscribe'] = (bool)$data['subscribe'] ?? false; + $data['subscribe'] = (bool)($data['subscribe'] ?? false); if (!$data['subscribe'] || empty($data['scope']) || !in_array(strtolower($data['scope']), ['all', 'tags'])) { $data['scope'] = '';