Checking the existence of '-' before array operation
See https://github.com/friendica/friendica/issues/6918#issuecomment-491490533
This commit is contained in:
parent
e853e256c7
commit
5002bda5fc
|
@ -87,7 +87,9 @@ class Federation extends BaseAdminModule
|
||||||
$part = array_pop($parts);
|
$part = array_pop($parts);
|
||||||
} while (!empty($parts) && ((strlen($part) >= 40) || (strlen($part) <= 3)));
|
} 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
|
// only take the x.x.x part of the version, not the "release" after the dash
|
||||||
$part = array_shift(explode('-', $part));
|
if (!empty($part) && strpos($part, '-')) {
|
||||||
|
$part = array_shift(explode('-', $part));
|
||||||
|
}
|
||||||
if (!empty($part)) {
|
if (!empty($part)) {
|
||||||
if (empty($compacted[$part])) {
|
if (empty($compacted[$part])) {
|
||||||
$compacted[$part] = $versionCounts[$key]['total'];
|
$compacted[$part] = $versionCounts[$key]['total'];
|
||||||
|
|
Loading…
Reference in a new issue