Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Multibyte Strings #225

Closed
wants to merge 17 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Multibyte String Enhancements: Update strtolower() and strtoupper()
raamdev committed Mar 4, 2016
commit de3bd9204c554e82c7f473b68beeba534f498e40
2 changes: 1 addition & 1 deletion src/includes/traits/Shared/DomainMappingUtils.php
Original file line number Diff line number Diff line change
@@ -272,6 +272,6 @@ public function domainMappingBlogDomains($blog_id = 0)
}
$wpdb->suppress_errors($suppressing_errors); // Restore.

return $domains = array_unique(array_map('strtolower', (array) $domains));
return $domains = array_unique(array_map('mb_strtolower', (array) $domains));
}
}
2 changes: 1 addition & 1 deletion src/includes/traits/Shared/FsUtils.php
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ public function nDirSeps($dir_file, $allow_trailing_slash = false)
}
if (mb_strpos($dir_file, ':' !== false)) {
if (preg_match('/^(?P<drive_letter>[a-zA-Z])\:[\/\\\\]/u', $dir_file)) {
$dir_file = preg_replace_callback('/^(?P<drive_letter>[a-zA-Z])\:[\/\\\\]/u', create_function('$m', 'return strtoupper($m[0]);'), $dir_file);
$dir_file = preg_replace_callback('/^(?P<drive_letter>[a-zA-Z])\:[\/\\\\]/u', create_function('$m', 'return mb_strtoupper($m[0]);'), $dir_file);
}
}
$dir_file = preg_replace('/\/+/u', '/', str_replace([DIRECTORY_SEPARATOR, '\\', '/'], '/', $dir_file));
2 changes: 1 addition & 1 deletion src/includes/traits/Shared/HttpUtils.php
Original file line number Diff line number Diff line change
@@ -110,7 +110,7 @@ public function cacheableHeadersList()
'X-Powered-By',
'X-UA-Compatible',
];
$cacheable_headers = array_map('strtolower', $cacheable_headers);
$cacheable_headers = array_map('mb_strtolower', $cacheable_headers);

foreach ($headers as $_key => $_header) {
$_header = mb_strtolower((string) strstr($_header, ':', true));