Skip to content

Commit 2c032bc

Browse files
committed
Add setlocale to mb_search
1 parent 400b682 commit 2c032bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

api/v1/Location.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public function getCities(string $countryName, string $search = NULL)
7171
*/
7272
public function mb_search(string $haystack, string $needle)
7373
{
74+
setlocale(LC_ALL, 'en_US.UTF8');
7475
$haystack = preg_replace('/[\'^`~\"]/', '', iconv('UTF-8', 'ASCII//TRANSLIT', $haystack));
7576
$needle = preg_replace('/[\'^`~\"]/', '', iconv('UTF-8', 'ASCII//TRANSLIT', $needle));
7677
return mb_stripos($haystack, $needle);

0 commit comments

Comments
 (0)