CRM_Utils_String::munge() - Change test
authorcolemanw <coleman@civicrm.org>
Sat, 22 Jul 2023 03:29:49 +0000 (20:29 -0700)
committerTim Otten <totten@civicrm.org>
Sat, 22 Jul 2023 03:33:38 +0000 (20:33 -0700)
CRM/Utils/String.php

index e9ba8ee98f3081cf2c97f927ad80394a3b715a1e..920edf7a842b570f6280776269be6e7330ced5e3 100644 (file)
@@ -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);
     }