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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user