Fix some warnings
This commit is contained in:
parent
8e0a3d00bb
commit
2335af9bf2
3 changed files with 12 additions and 6 deletions
|
@ -145,9 +145,11 @@ class Actor
|
|||
$fields['gsid'] = GServer::getRealID($fields['baseurl'], true);
|
||||
}
|
||||
|
||||
foreach ($directory->verificationMethod as $method) {
|
||||
if (!empty($method->publicKeyMultibase)) {
|
||||
$fields['pubkey'] = $method->publicKeyMultibase;
|
||||
if (!empty($directory->verificationMethod)) {
|
||||
foreach ($directory->verificationMethod as $method) {
|
||||
if (!empty($method->publicKeyMultibase)) {
|
||||
$fields['pubkey'] = $method->publicKeyMultibase;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,8 +105,12 @@ class Jetstream
|
|||
$last_timeout = time();
|
||||
while (true) {
|
||||
try {
|
||||
$message = $this->client->receive();
|
||||
$data = json_decode($message);
|
||||
$message = @$this->client->receive();
|
||||
if (empty($message)) {
|
||||
$this->logger->notice('Empty message received');
|
||||
break;
|
||||
}
|
||||
$data = json_decode($message);
|
||||
if (is_object($data)) {
|
||||
$timestamp = $data->time_us;
|
||||
$this->route($data);
|
||||
|
|
|
@ -2065,7 +2065,7 @@ class Receiver
|
|||
}
|
||||
|
||||
foreach ($object_data['tags'] as $tag) {
|
||||
if (HTTPSignature::isValidContentType($tag['mediaType'] ?? '', $tag['href'])) {
|
||||
if (HTTPSignature::isValidContentType($tag['mediaType'] ?? '', $tag['href'] ?? '')) {
|
||||
$object_data['quote-url'] = $tag['href'];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue