From a0c1c3f661554053d012aa029fcf47dbc36528af Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 25 Oct 2021 20:54:36 +0000 Subject: [PATCH] Fix notice "Array to string conversion" --- src/Model/GServer.php | 10 +++++----- src/Worker/PubSubPublish.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Model/GServer.php b/src/Model/GServer.php index f09f53b04..7c5a2b98a 100644 --- a/src/Model/GServer.php +++ b/src/Model/GServer.php @@ -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; } diff --git a/src/Worker/PubSubPublish.php b/src/Worker/PubSubPublish.php index 49aef00c9..a1fb1f5b5 100644 --- a/src/Worker/PubSubPublish.php +++ b/src/Worker/PubSubPublish.php @@ -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();