From a3a32af5c1d47f036cade7db21a8bbf512d3e566 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 3 Jan 2022 19:26:22 +0100 Subject: [PATCH] Add feedback --- src/App/Arguments.php | 3 +++ src/BaseModule.php | 2 +- src/Module/Api/Mastodon/Accounts/Followers.php | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/App/Arguments.php b/src/App/Arguments.php index ce24740839..4d386fc255 100644 --- a/src/App/Arguments.php +++ b/src/App/Arguments.php @@ -99,6 +99,9 @@ class Arguments return $this->argv; } + /** + * @return string The used HTTP method + */ public function getMethod() { return $this->method; diff --git a/src/BaseModule.php b/src/BaseModule.php index bd096d94a4..c1a926a3a5 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -223,7 +223,7 @@ abstract class BaseModule implements ICanHandleRequests $this->profiler->set(microtime(true) - $timestamp, 'init'); - switch ($this->args->getMethod() ?? Router::GET) { + switch ($this->args->getMethod()) { case Router::DELETE: $this->delete($request); break; diff --git a/src/Module/Api/Mastodon/Accounts/Followers.php b/src/Module/Api/Mastodon/Accounts/Followers.php index d5fef22a6c..58d1f7d834 100644 --- a/src/Module/Api/Mastodon/Accounts/Followers.php +++ b/src/Module/Api/Mastodon/Accounts/Followers.php @@ -73,6 +73,8 @@ class Followers extends BaseApi $params['order'] = ['cid']; } + $accounts = []; + $followers = DBA::select('contact-relation', ['relation-cid'], $condition, $params); while ($follower = DBA::fetch($followers)) { self::setBoundaries($follower['relation-cid']);