]> git.mxchange.org Git - friendica.git/commitdiff
Add a default value for $data['version'] in Model\GServer
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 26 Nov 2022 22:28:55 +0000 (17:28 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 26 Nov 2022 22:28:55 +0000 (17:28 -0500)
- Address https://github.com/friendica/friendica/issues/11993#issuecomment-1327320541

src/Model/GServer.php

index 5bf95583fed8164741682d4293d1e4addf34cc77..03e42c62b4eacf2a26c53463ba78d8fa31fcdcd2 100644 (file)
@@ -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);
-                                       }       
+                                       }
                                }
                        }
                }