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']);