aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Digitigrade/Model/Actor.php1
-rw-r--r--routes/actor.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/Digitigrade/Model/Actor.php b/Digitigrade/Model/Actor.php
index 799f8c8..95c2d68 100644
--- a/Digitigrade/Model/Actor.php
+++ b/Digitigrade/Model/Actor.php
@@ -125,6 +125,7 @@ class Actor extends PushableModel implements RpcReceiver {
}
}
FollowRelation::findByActors($args[0], $this)->remove();
+ return;
default:
throw new \RuntimeException("Actor rpc method $method not (yet?) implemented");
diff --git a/routes/actor.php b/routes/actor.php
index 30b28c5..98e8f4e 100644
--- a/routes/actor.php
+++ b/routes/actor.php
@@ -12,7 +12,7 @@ Router::getInstance()->mount('/user/:handle', function (array $args) {
if ($actor == null) {
throw new NotFound("i don't know any local user called " . $args['handle']);
}
- if (str_contains($_SERVER['HTTP_ACCEPT'], 'text/html')) {
+ if (isset($_SERVER['HTTP_ACCEPT']) && str_contains($_SERVER['HTTP_ACCEPT'], 'text/html')) {
throw new TemporaryRedirect(path_to_uri("/@/$actor->handle"));
}
json_response($actor);