Skip to content

Commit

Permalink
PHP 8.1 > Always pass string to rtrim
Browse files Browse the repository at this point in the history
Fixes the following deprecation:
rtrim(): Passing null to parameter FriendsOfBehat#1 ($string) of type string is deprecated in vendor/friends-of-behat/mink-extension/src/Behat/MinkExtension/Context/RawMinkContext.php line 144
  • Loading branch information
ruudk authored Dec 23, 2021
1 parent 16c6168 commit 7c7f059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Behat/MinkExtension/Context/RawMinkContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function visitPath($path, $sessionName = null)
*/
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;
}
Expand Down

0 comments on commit 7c7f059

Please sign in to comment.