Skip to content

Commit 252be3c

Browse files
committed
Avoid wrnings in case we can't get the active branches for some reason
1 parent 772fa9b commit 252be3c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

include/branches.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ function get_active_branches($include_recent_eols = true) {
139139
}
140140
}
141141
}
142-
ksort($branches[$major]);
142+
if (!empty($branches[$major])) {
143+
ksort($branches[$major]);
144+
}
143145
}
144146

145147
ksort($branches);

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898

9999
$intro .= "<ul>\n";
100100
foreach (get_active_branches() as $major => $releases) {
101-
foreach ($releases as $release) {
101+
foreach ((array)$releases as $release) {
102102
$version = $release['version'];
103103
list($major, $minor, $_) = explode('.', $version);
104104
$intro .= "

0 commit comments

Comments
 (0)