diff --git a/src/helpers.php b/src/helpers.php index 2ba0069..c3efe2c 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -7,7 +7,7 @@ */ function rename_chromedriver_binary(string $binary, string $operatingSystem): string { - return strpos($binary, DIRECTORY_SEPARATOR) > 0 + return mb_strpos($binary, DIRECTORY_SEPARATOR) > 0 ? array_reverse(explode(DIRECTORY_SEPARATOR, str_replace('chromedriver', 'chromedriver-'.$operatingSystem, $binary), 2))[0] : str_replace('chromedriver', 'chromedriver-'.$operatingSystem, $binary); }