mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Check scheme is truthy before setting it to the request
This commit is contained in:
parent
dd3379e68f
commit
b922c0d732
@ -79,7 +79,9 @@ class CLIRequestBuilder extends HTTPRequestBuilder
|
|||||||
$request = parent::createFromVariables($variables, $input);
|
$request = parent::createFromVariables($variables, $input);
|
||||||
// unset scheme so that SS_BASE_URL can provide `is_https` information if required
|
// 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);
|
$scheme = parse_url(Environment::getEnv('SS_BASE_URL'), PHP_URL_SCHEME);
|
||||||
|
if ($scheme) {
|
||||||
$request->setScheme($scheme);
|
$request->setScheme($scheme);
|
||||||
|
}
|
||||||
|
|
||||||
return $request;
|
return $request;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user