Issue #3316971 by Mile23, andypost: Ensure run-tests.sh works with future PHP versions
(cherry picked from commit fb0e14e172
)
merge-requests/2710/merge
parent
45461e7ac6
commit
f4a08b7c7c
|
@ -545,7 +545,11 @@ function simpletest_script_init() {
|
|||
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
|
||||
// Ensure that any and all environment variables are changed to https://.
|
||||
foreach ($_SERVER as $key => $value) {
|
||||
$_SERVER[$key] = str_replace('http://', 'https://', $_SERVER[$key]);
|
||||
// Some values are NULL. Non-NULL values which are falsy will not contain
|
||||
// text to replace.
|
||||
if ($value) {
|
||||
$_SERVER[$key] = str_replace('http://', 'https://', $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue