Fix curResult::getHeader() in GServer.php

This commit is contained in:
Philipp Holzer 2021-08-24 23:26:33 +02:00
parent 2356221aba
commit a3d0404290
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD

View file

@ -1619,11 +1619,11 @@ class GServer
} elseif ($curlResult->inHeader('x-diaspora-version')) {
$serverdata['platform'] = 'diaspora';
$serverdata['network'] = Protocol::DIASPORA;
$serverdata['version'] = $curlResult->getHeader('x-diaspora-version');
$serverdata['version'] = $curlResult->getHeader('x-diaspora-version')[0] ?? '';
} elseif ($curlResult->inHeader('x-friendica-version')) {
$serverdata['platform'] = 'friendica';
$serverdata['network'] = Protocol::DFRN;
$serverdata['version'] = $curlResult->getHeader('x-friendica-version');
$serverdata['version'] = $curlResult->getHeader('x-friendica-version')[0] ?? '';
} else {
return $serverdata;
}