@@ -99,7 +99,9 @@ function get_all_branches() {
99
99
100
100
foreach ($ GLOBALS ['OLDRELEASES ' ] as $ major => $ releases ) {
101
101
foreach ($ releases as $ version => $ release ) {
102
- if ($ branch = version_number_to_branch ($ version )) {
102
+ $ branch = version_number_to_branch ($ version );
103
+
104
+ if ($ branch ) {
103
105
if (!isset ($ branches [$ major ][$ branch ]) || version_compare ($ version , $ branches [$ major ][$ branch ]['version ' ], 'gt ' )) {
104
106
$ branches [$ major ][$ branch ] = $ release ;
105
107
$ branches [$ major ][$ branch ]['version ' ] = $ version ;
@@ -110,7 +112,9 @@ function get_all_branches() {
110
112
111
113
foreach ($ GLOBALS ['RELEASES ' ] as $ major => $ releases ) {
112
114
foreach ($ releases as $ version => $ release ) {
113
- if ($ branch = version_number_to_branch ($ version )) {
115
+ $ branch = version_number_to_branch ($ version );
116
+
117
+ if ($ branch ) {
114
118
if (!isset ($ branches [$ major ][$ branch ]) || version_compare ($ version , $ branches [$ major ][$ branch ]['version ' ], 'gt ' )) {
115
119
$ branches [$ major ][$ branch ] = $ release ;
116
120
$ branches [$ major ][$ branch ]['version ' ] = $ version ;
@@ -133,7 +137,9 @@ function get_active_branches($include_recent_eols = true) {
133
137
134
138
foreach ($ GLOBALS ['RELEASES ' ] as $ major => $ releases ) {
135
139
foreach ($ releases as $ version => $ release ) {
136
- if ($ branch = version_number_to_branch ($ version )) {
140
+ $ branch = version_number_to_branch ($ version );
141
+
142
+ if ($ branch ) {
137
143
$ threshold = get_branch_security_eol_date ($ branch );
138
144
if ($ threshold === null ) {
139
145
// No EOL date available, assume it is ancient.
@@ -168,7 +174,9 @@ function get_eol_branches($always_include = null) {
168
174
// Gather the last release on each branch into a convenient array.
169
175
foreach ($ GLOBALS ['OLDRELEASES ' ] as $ major => $ releases ) {
170
176
foreach ($ releases as $ version => $ release ) {
171
- if ($ branch = version_number_to_branch ($ version )) {
177
+ $ branch = version_number_to_branch ($ version );
178
+
179
+ if ($ branch ) {
172
180
if (!isset ($ branches [$ major ][$ branch ]) || version_compare ($ version , $ branches [$ major ][$ branch ]['version ' ], 'gt ' )) {
173
181
$ branches [$ major ][$ branch ] = [
174
182
'date ' => strtotime ($ release ['date ' ]),
@@ -184,7 +192,9 @@ function get_eol_branches($always_include = null) {
184
192
* the $RELEASES array and not explicitly marked as EOL there". */
185
193
foreach ($ GLOBALS ['RELEASES ' ] as $ major => $ releases ) {
186
194
foreach ($ releases as $ version => $ release ) {
187
- if ($ branch = version_number_to_branch ($ version )) {
195
+ $ branch = version_number_to_branch ($ version );
196
+
197
+ if ($ branch ) {
188
198
if ($ now < get_branch_security_eol_date ($ branch )) {
189
199
/* This branch isn't EOL: remove it from our array. */
190
200
if (isset ($ branches [$ major ][$ branch ])) {
@@ -207,7 +217,9 @@ function get_eol_branches($always_include = null) {
207
217
208
218
if (isset ($ GLOBALS ['RELEASES ' ][$ major ][$ version ])) {
209
219
$ release = $ GLOBALS ['RELEASES ' ][$ major ][$ version ];
210
- if ($ branch = version_number_to_branch ($ version )) {
220
+ $ branch = version_number_to_branch ($ version );
221
+
222
+ if ($ branch ) {
211
223
$ branches [$ major ][$ branch ] = [
212
224
'date ' => strtotime ($ release ['source ' ][0 ]['date ' ]),
213
225
'link ' => "/downloads#v $ version " ,
0 commit comments