New upstream version 0.6.27
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
||||
<?php
|
||||
|
||||
// phpcs:disable PSR1.Files.SideEffects
|
||||
defined('SYSPATH') or die('No direct access allowed.');
|
||||
// phpcs:enable PSR1.Files.SideEffects
|
||||
/**
|
||||
* utf8::strlen
|
||||
*
|
||||
@@ -10,12 +14,14 @@
|
||||
*/
|
||||
function _strlen($str)
|
||||
{
|
||||
// Try mb_strlen() first because it's faster than combination of is_ascii() and strlen()
|
||||
if (SERVER_UTF8)
|
||||
return mb_strlen($str);
|
||||
// Try mb_strlen() first because it's faster than combination of is_ascii() and strlen()
|
||||
if (SERVER_UTF8) {
|
||||
return mb_strlen($str);
|
||||
}
|
||||
|
||||
if (utf8::is_ascii($str))
|
||||
return strlen($str);
|
||||
if (utf8::is_ascii($str)) {
|
||||
return strlen($str);
|
||||
}
|
||||
|
||||
return strlen(utf8_decode($str));
|
||||
}
|
||||
return strlen(utf8_decode($str));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user