Commit 3aebb57f authored by catch's avatar catch
Browse files

Issue #3316971 by Mile23, andypost: Ensure run-tests.sh works with future PHP versions

(cherry picked from commit fb0e14e1)
parent 1da99ce5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -548,7 +548,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);
      }
    }
  }