AP: Fix a notice / avoid an error when fetched content hadn't been an array
This commit is contained in:
@@ -63,7 +63,13 @@ class ActivityPub
|
||||
return false;
|
||||
}
|
||||
|
||||
return json_decode($curlResult->getBody(), true);
|
||||
$content = json_decode($curlResult->getBody(), true);
|
||||
|
||||
if (empty($content) || !is_array($content)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user