New upstream version 0.6.27

This commit is contained in:
geos_one
2025-08-06 18:11:51 +02:00
parent a6b4158f1f
commit 56a986c0ba
563 changed files with 45811 additions and 35282 deletions

View File

@@ -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));
}