aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoranonymous puppy2026-01-21 19:49:18 +0000
committerjade (winter)2026-01-21 20:06:29 +0000
commited465091554b84c9863e39725ddf56b789d64669 (patch)
tree9e9769806cb27f4f8d8c63ed46f2d512bb759575
parent4f928f9ea883fc2125437e8831df18cd856d715b (diff)
Fix null warning in Actor follow
-rw-r--r--Digitigrade/Model/Actor.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Digitigrade/Model/Actor.php b/Digitigrade/Model/Actor.php
index a8909df..1db464d 100644
--- a/Digitigrade/Model/Actor.php
+++ b/Digitigrade/Model/Actor.php
@@ -199,7 +199,7 @@ class Actor extends PushableModel implements RpcReceiver {
switch ($method) {
case 'follow':
$status = $this->requestToFollow ? FollowRelationStatus::PENDING : FollowRelationStatus::ACTIVE;
- if (strlen(trim($result->body)) > 0) { // remote server returned new status, use that instead
+ if (isset($result->body) && strlen(trim($result->body)) > 0) { // remote server returned new status, use that instead
$status = FollowRelationStatus::tryFrom(trim($result->body)) ?? $status;
}
$rel = FollowRelation::create($args[0], $this, $status);