Skip to content

Commit

Permalink
Make sure base path is a string before calling setServerParameter
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Dec 13, 2021
1 parent dd5f39f commit e3db560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BrowserKitDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function __construct(AbstractBrowser $client, $baseUrl = null)
$this->client->followRedirects(true);

if ($baseUrl !== null && $client instanceof HttpKernelBrowser) {
$client->setServerParameter('SCRIPT_FILENAME', parse_url($baseUrl, PHP_URL_PATH));
$client->setServerParameter('SCRIPT_FILENAME', parse_url($baseUrl, PHP_URL_PATH) ?? '');
}
}

Expand Down

0 comments on commit e3db560

Please sign in to comment.