From 89302d0843308c8fa7cc0537cb10943e8defc8ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Sat, 18 Jun 2022 05:06:00 +0200 Subject: [PATCH] Some outside code relies on returned "false" --- src/Protocol/Diaspora.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index c0a338344..c71745a42 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -323,14 +323,14 @@ class Diaspora * @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \ImagickException */ - public static function decode(string $xml, string $privKey = ''): array + public static function decode(string $xml, string $privKey = '') { $public = false; $basedom = XML::parseString($xml); if (!is_object($basedom)) { Logger::notice('XML is not parseable.'); - return []; + return false; } $children = $basedom->children('https://joindiaspora.com/protocol'); @@ -344,7 +344,7 @@ class Diaspora // This happens with posts from a relais if (empty($privKey)) { Logger::info('This is no private post in the old format'); - return []; + return false; } $encrypted_header = json_decode(base64_decode($children->encrypted_header));