From 360bf5db463fc86e5122866edf97b909c1f2676b Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 5 Sep 2024 18:03:01 +0700 Subject: [PATCH] Revert "Update common.php" This reverts commit 3911e72dba800ed099a00fc0619fcb06addc5d73. --- common.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/common.php b/common.php index 96de37e9d..47c39eb68 100644 --- a/common.php +++ b/common.php @@ -239,13 +239,12 @@ function htmlCHR($txt, bool $double_encode = false, int $quote_style = ENT_QUOTE } /** - * @param string|null $str - * @return string|null + * @param string $str + * @return string */ -function str_compact(string|null $str): ?string +function str_compact($str) { - $str ??= ''; - return preg_replace('#\s+#u', ' ', trim($str)); + return preg_replace('#\s+#u', ' ', trim($str ?? '')); } /**