From 670984854f4432ac0a48fbac86cc49b0a84b9d22 Mon Sep 17 00:00:00 2001 From: Jens Schuppe Date: Tue, 9 Apr 2024 13:14:37 +0200 Subject: [PATCH] Fix accidentally flipped condition --- CRM/Twingle/Profile.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CRM/Twingle/Profile.php b/CRM/Twingle/Profile.php index 523cb18..1a150af 100644 --- a/CRM/Twingle/Profile.php +++ b/CRM/Twingle/Profile.php @@ -259,8 +259,7 @@ class CRM_Twingle_Profile { } // Restrict profile names to alphanumeric characters, space and the underscore. - $contains_illegal_characters = (1 !== preg_match('/[^A-Za-z0-9_\s]/', $this->getName())); - if ($contains_illegal_characters) { + if (1 === preg_match('/[^A-Za-z0-9_\s]/', $this->getName())) { throw new ProfileValidationError( 'name', E::ts('Only alphanumeric characters, space and the underscore (_) are allowed for profile names.'),