From e3db560a7ec02d0de9a635ab69b3702e24afdd27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edi=20Modri=C4=87?= Date: Wed, 25 Mar 2020 09:48:59 +0100 Subject: [PATCH] Make sure base path is a string before calling setServerParameter --- src/BrowserKitDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BrowserKitDriver.php b/src/BrowserKitDriver.php index 2036124..0c9b921 100644 --- a/src/BrowserKitDriver.php +++ b/src/BrowserKitDriver.php @@ -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) ?? ''); } }