Skip to content

Commit

Permalink
Merge pull request #2 from emodric/patch-1
Browse files Browse the repository at this point in the history
Make sure base path is a string before calling setServerParameter
  • Loading branch information
Yozhef authored Dec 13, 2021
2 parents dd5f39f + e3db560 commit b3c29f1
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 b3c29f1

Please sign in to comment.