Commit: 252be3c2f07b1c6032724be9c38bd36fb3eafa56 Author: Rasmus Lerdorf <[email protected]> Thu, 4 Aug 2016 20:52:37 -0700 Parents: 772fa9b691f4e1ce730541929e71f08eaeace1d9 Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=252be3c2f07b1c6032724be9c38bd36fb3eafa56 Log: Avoid wrnings in case we can't get the active branches for some reason Changed paths: M include/branches.inc M index.php Diff: diff --git a/include/branches.inc b/include/branches.inc index 9b128b9..5958fa2 100644 --- a/include/branches.inc +++ b/include/branches.inc @@ -139,7 +139,9 @@ function get_active_branches($include_recent_eols = true) { } } } - ksort($branches[$major]); + if (!empty($branches[$major])) { + ksort($branches[$major]); + } } ksort($branches); diff --git a/index.php b/index.php index cd13291..42639c0 100644 --- a/index.php +++ b/index.php @@ -98,7 +98,7 @@ EOF; $intro .= "<ul>\n"; foreach (get_active_branches() as $major => $releases) { - foreach ($releases as $release) { + foreach ((array)$releases as $release) { $version = $release['version']; list($major, $minor, $_) = explode('.', $version); $intro .= " -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
