Ward against potentially missing "platform" array key in Model\GServer::fetchSiteinfo

- Address https://github.com/friendica/friendica/issues/12488#issuecomment-1411635902
This commit is contained in:
Hypolite Petovan 2023-02-01 08:35:33 -05:00
parent 31d01dc684
commit 301fa681c5

View file

@ -1416,7 +1416,7 @@ class GServer
$serverdata['detection-method'] = self::DETECT_SITEINFO_JSON;
}
if (!empty($data['url'])) {
if (!empty($data['platform'])) {
$serverdata['platform'] = strtolower($data['platform']);
$serverdata['version'] = $data['version'] ?? 'N/A';
}