From 7c7f059b1edeac2bd652c7ea9e669b18e20e08b9 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Thu, 23 Dec 2021 11:11:26 +0100 Subject: [PATCH] PHP 8.1 > Always pass `string` to `rtrim` Fixes the following deprecation: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/friends-of-behat/mink-extension/src/Behat/MinkExtension/Context/RawMinkContext.php line 144 --- src/Behat/MinkExtension/Context/RawMinkContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Behat/MinkExtension/Context/RawMinkContext.php b/src/Behat/MinkExtension/Context/RawMinkContext.php index 8e0a927..3b81f7a 100644 --- a/src/Behat/MinkExtension/Context/RawMinkContext.php +++ b/src/Behat/MinkExtension/Context/RawMinkContext.php @@ -141,7 +141,7 @@ class RawMinkContext implements MinkAwareContext */ public function locatePath($path) { - $startUrl = rtrim($this->getMinkParameter('base_url'), '/') . '/'; + $startUrl = rtrim($this->getMinkParameter('base_url') ?? '', '/') . '/'; return 0 !== strpos($path, 'http') ? $startUrl . ltrim($path, '/') : $path; }