Fix variable by reference notice in Module\Admin\Federation
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 15 Jun 2019 21:12:36 +0000 (17:12 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 15 Jun 2019 21:12:36 +0000 (17:12 -0400)
- Addresses https://github.com/friendica/friendica/issues/6918#issuecomment-502347979

src/Module/Admin/Federation.php

index 9c52845..8776f21 100644 (file)
@@ -88,7 +88,7 @@ class Federation extends BaseAdminModule
                                        } while (!empty($parts) && ((strlen($part) >= 40) || (strlen($part) <= 3)));
                                        // only take the x.x.x part of the version, not the "release" after the dash
                                        if (!empty($part) && strpos($part, '-')) {
-                                               $part = array_shift(explode('-', $part));
+                                               $part = explode('-', $part)[0];
                                        }
                                        if (!empty($part)) {
                                                if (empty($compacted[$part])) {