FIX Check scheme is truthy before setting it to the request

This commit is contained in:
Robbie Averill 2018-09-03 08:59:37 +02:00
parent dd3379e68f
commit b922c0d732

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);
if ($scheme) {
$request->setScheme($scheme);
}
return $request;
}