From 82af724a648ce25f8f5510c296d6d8aad9ad38bd Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 22 Jul 2023 12:30:34 +0800 Subject: [PATCH] wip --- src/helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }