1
1
Fork 0

Fix notice "Array to string conversion"

This commit is contained in:
Michael 2021-10-25 20:54:36 +00:00
parent ad6d11b371
commit a0c1c3f661
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();