Add check for mb_trim, as it's built-in on PHP 8.4

This commit is contained in:
Timothy Warren 2025-03-21 13:16:51 -04:00
parent 433448fd8d
commit e00b56aac4

View File

@ -19,12 +19,16 @@ use Query\{ConnectionManager, QueryBuilderInterface};
/**
* Global functions that don't really fit anywhere else
*/
/**
* Multibyte-safe trim function
*/
function mb_trim(string $string): string
if ( ! function_exists('mb_trim'))
{
return preg_replace('/(^\s+)|(\s+$)/u', '', $string);
/**
* Multibyte-safe trim function
*/
function mb_trim(string $string): string
{
return preg_replace('/(^\s+)|(\s+$)/u', '', $string);
}
}
/**