diff --git a/src/App/Arguments.php b/src/App/Arguments.php index ce2474083..4d386fc25 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 bd096d94a..c1a926a3a 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 d5fef22a6..58d1f7d83 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']);