Merge pull request #10933 from annando/notice

Fix notice "Array to string conversion"
This commit is contained in:
Hypolite Petovan 2021-10-25 20:49:47 -04:00 committed by GitHub
commit e9a258b284
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -113,7 +113,7 @@ class GServer
if ($no_check || !self::check($url)) {
return null;
}
return self::getID($url, true);
}
@ -1365,7 +1365,7 @@ class GServer
if (in_array($serverdata['detection-method'], [self::DETECT_HEADER, self::DETECT_BODY, self::DETECT_MANUAL])) {
$serverdata['detection-method'] = self::DETECT_GNUSOCIAL;
}
return $serverdata;
}
@ -1425,7 +1425,7 @@ class GServer
return $serverdata;
}
if (in_array($serverdata['detection-method'], [self::DETECT_HEADER, self::DETECT_BODY, self::DETECT_MANUAL])) {
if (in_array($serverdata['detection-method'], [self::DETECT_HEADER, self::DETECT_BODY, self::DETECT_MANUAL])) {
$serverdata['detection-method'] = $friendika ? self::DETECT_FRIENDIKA : self::DETECT_FRIENDICA;
}
@ -1670,7 +1670,7 @@ class GServer
$gservers = DBA::select('gserver', ['id', 'url', 'nurl', 'network', 'poco', 'directory-type'],
["NOT `failed` AND `directory-type` != ? AND `last_poco_query` < ?", GServer::DT_NONE, $last_update],
['order' => ['RAND()']]);
while ($gserver = DBA::fetch($gservers)) {
Logger::info('Update peer list', ['server' => $gserver['url'], 'id' => $gserver['id']]);
Worker::add(PRIORITY_LOW, 'UpdateServerPeers', $gserver['url']);
@ -1680,7 +1680,7 @@ class GServer
$fields = ['last_poco_query' => DateTimeFormat::utcNow()];
DBA::update('gserver', $fields, ['nurl' => $gserver['nurl']]);
if (--$no_of_queries == 0) {
break;
}

View File

@ -66,7 +66,7 @@ class PubSubPublish
$subscriber['topic']),
'X-Hub-Signature' => 'sha1=' . $hmac_sig];
Logger::debug('POST ' . ['headers' => $headers, 'params' => $params]);
Logger::debug('POST', ['headers' => $headers, 'params' => $params]);
$postResult = DI::httpClient()->post($subscriber['callback_url'], $params, $headers);
$ret = $postResult->getReturnCode();