[web-php] master: Fix regression: selected PHP version ignored on downloads page (#2083)
| From: | Jordi Kroon via GitHub | Date: | Wed, 18 Nov 2026 19:11:51 +0000 |
| Subject: | [web-php] master: Fix regression: selected PHP version ignored on downloads page (#2083) | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-34217@lists.php.net to get a copy of this message | ||
Author: Jordi Kroon (jordikroon)
Committer: GitHub (web-flow)
Pusher: TimWolla
Date: 2026-11-18T20:11:47+01:00
Commit: https://github.com/php/web-php/commit/199cec4ccce64f891f1c3d86056a793050d332de
Raw diff: https://github.com/php/web-php/commit/199cec4ccce64f891f1c3d86056a793050d332de.diff
Fix regression: selected PHP version ignored on downloads page (#2083)
Changed paths:
M public/downloads-get-instructions.php
Diff:
diff --git a/public/downloads-get-instructions.php b/public/downloads-get-instructions.php
index 5e4fed31fc..f75e5a6da2 100644
--- a/public/downloads-get-instructions.php
+++ b/public/downloads-get-instructions.php
@@ -1,6 +1,7 @@
<?php
$file = 'unknown';
$latestPhpVersion = '8.5';
+$versions ??= [];
if (!isset($options)) {
$options = [
@@ -31,7 +32,7 @@
$multiversion = $options['multiversion'] === 'Y';
}
-if (!in_array($options['version'], $versions, true)) {
+if (!array_key_exists($options['version'], $versions)) {
$options['version'] = 'default';
}