com web/php: Consider all releases with the same EOL date: releases/index.php

From: Date: Thu, 31 Jan 2019 13:33:25 +0000
Subject: com web/php: Consider all releases with the same EOL date: releases/index.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-27735@lists.php.net to get a copy of this message
Commit: da85b2579bd86d54e88e8c60d3018275d23eccf2 Author: Christoph M. Becker <cmbecker69@gmx.de> Thu, 31 Jan 2019 14:32:28 +0100 Parents: d160aebe33832d66c5d243473ad62ce05c7cd693 Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=da85b2579bd86d54e88e8c60d3018275d23eccf2 Log: Consider all releases with the same EOL date The algorithm to find the two most recently EOL'd versions built an array where the EOL date is the key. This can't work for multiple releases with the same EOL date. We **hack** around this by increasing the timestamp to avoid duplicates being overwritten. Changed paths: M releases/index.php Diff: diff --git a/releases/index.php b/releases/index.php index de5429a..b04f5ee 100644 --- a/releases/index.php +++ b/releases/index.php @@ -77,7 +77,9 @@ if (isset($_GET["serialize"]) || isset($_GET["json"])) { $eol = array(); foreach (get_eol_branches() as $major => $branches) { foreach ($branches as $branch => $detail) { - $eol[$detail['date']] = sprintf('<li>%s: %s</li>', $branch, date('j M Y', $detail['date'])); + $detail_date = $detail['date']; + while (isset($eol[$detail_date])) $detail_date++; + $eol[$detail_date] = sprintf('<li>%s: %s</li>', $branch, date('j M Y', $detail_date)); } } krsort($eol);

« previous php.webmaster (#27735) next »