From 766b3f0d01ac48fdb8d696277bfc6244333b9f8b Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 16 Nov 2021 22:39:23 +0100 Subject: [PATCH] Fixups --- src/LegacyModule.php | 2 +- src/Module/Acctlink.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/LegacyModule.php b/src/LegacyModule.php index 38c3e9a8f..53f767660 100644 --- a/src/LegacyModule.php +++ b/src/LegacyModule.php @@ -91,7 +91,7 @@ class LegacyModule extends BaseModule $a = DI::app(); return $function_name($a); } else { - return parent::{$function_suffix}($this->parameters); + return parent::{$function_suffix}(); } } } diff --git a/src/Module/Acctlink.php b/src/Module/Acctlink.php index b14bbf8d7..4093e3cd8 100644 --- a/src/Module/Acctlink.php +++ b/src/Module/Acctlink.php @@ -24,13 +24,14 @@ namespace Friendica\Module; use Friendica\BaseModule; use Friendica\Core\System; use Friendica\Model\Contact; +use Friendica\Network\HTTPException\NotFoundException; /** * Redirects to another URL based on the parameter 'addr' */ class Acctlink extends BaseModule { - public function content(): string + public function rawContent() { $addr = trim($_GET['addr'] ?? ''); @@ -42,6 +43,6 @@ class Acctlink extends BaseModule } } - return ''; + throw new NotFoundException('Parameter "url" is missing'); } }