From d7704f75207f2fe1e6058a9c31b8de321dd4da5b Mon Sep 17 00:00:00 2001 From: colemanw Date: Fri, 21 Jul 2023 20:29:49 -0700 Subject: [PATCH] CRM_Utils_String::munge() - Change test --- CRM/Utils/String.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/String.php b/CRM/Utils/String.php index e9ba8ee98f..920edf7a84 100644 --- a/CRM/Utils/String.php +++ b/CRM/Utils/String.php @@ -73,8 +73,8 @@ class CRM_Utils_String { // CRM-11744 $name = preg_replace('/[^a-zA-Z0-9]+/', $char, trim($name)); - //If there are no ascii characters present. - if ($name == $char) { + // If there are no ascii characters present. + if (!strlen(trim($name, $char))) { $name = self::createRandom($len, self::ALPHANUMERIC); } -- 2.25.1