From a5f601718f7af0c3ade7c3c1f8d6e971e5c708ef Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 26 Nov 2022 17:28:55 -0500 Subject: [PATCH] Add a default value for $data['version'] in Model\GServer - Address https://github.com/friendica/friendica/issues/11993#issuecomment-1327320541 --- src/Model/GServer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/GServer.php b/src/Model/GServer.php index 5bf95583fe..03e42c62b4 100644 --- a/src/Model/GServer.php +++ b/src/Model/GServer.php @@ -1213,7 +1213,7 @@ class GServer if (!empty($data['url'])) { $serverdata['platform'] = strtolower($data['platform']); - $serverdata['version'] = $data['version']; + $serverdata['version'] = $data['version'] ?? 'N/A'; } if (!empty($data['plugins'])) { @@ -2172,7 +2172,7 @@ class GServer foreach ($servers['instances'] as $server) { $url = (is_null($server['https_score']) ? 'http' : 'https') . '://' . $server['name']; self::add($url); - } + } } } }