Merge pull request #8358 from creative-commoners/pulls/4.0/check-scheme

FIX Check scheme is truthy before setting it to the request
This commit is contained in:
Loz Calver 2018-09-03 09:31:03 +01:00 committed by GitHub
commit 536a1c08b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -79,7 +79,9 @@ class CLIRequestBuilder extends HTTPRequestBuilder
$request = parent::createFromVariables($variables, $input);
// unset scheme so that SS_BASE_URL can provide `is_https` information if required
$scheme = parse_url(Environment::getEnv('SS_BASE_URL'), PHP_URL_SCHEME);
$request->setScheme($scheme);
if ($scheme) {
$request->setScheme($scheme);
}
return $request;
}