From 31ac7a7310bcafa81c9a5be6e5d9b8fd48d495d9 Mon Sep 17 00:00:00 2001 From: Remigijus Kiminas Date: Mon, 17 Jan 2022 03:32:58 -0500 Subject: [PATCH] Empty tags should not be stored --- lhc_web/lib/models/lhchat/erlhcoreclassmodelcannedmsg.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lhc_web/lib/models/lhchat/erlhcoreclassmodelcannedmsg.php b/lhc_web/lib/models/lhchat/erlhcoreclassmodelcannedmsg.php index c63597b59..b8825c6fa 100644 --- a/lhc_web/lib/models/lhchat/erlhcoreclassmodelcannedmsg.php +++ b/lhc_web/lib/models/lhchat/erlhcoreclassmodelcannedmsg.php @@ -201,8 +201,8 @@ public function afterSave() $tags[] = trim($tagKeyword); } - $tags = array_unique($tags); - + $tags = array_filter(array_unique($tags)); + foreach ($tags as $tagKeyword) { $tagKeywordTrimmed = trim($tagKeyword);