Update common.php

This commit is contained in:
Roman Kelesidis 2024-09-05 18:01:16 +07:00
commit 3793263ff0

View file

@ -245,7 +245,7 @@ function htmlCHR($txt, bool $double_encode = false, int $quote_style = ENT_QUOTE
function str_compact(string|null $str): ?string function str_compact(string|null $str): ?string
{ {
$str ??= ''; $str ??= '';
return preg_replace('#\s+#u', ' ', trim($str)); return preg_replace('/\s\s+/', ' ', trim($str));
} }
/** /**