Fix accidentally flipped condition
This commit is contained in:
parent
3612122650
commit
670984854f
1 changed files with 1 additions and 2 deletions
|
@ -259,8 +259,7 @@ class CRM_Twingle_Profile {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restrict profile names to alphanumeric characters, space and the underscore.
|
// Restrict profile names to alphanumeric characters, space and the underscore.
|
||||||
$contains_illegal_characters = (1 !== preg_match('/[^A-Za-z0-9_\s]/', $this->getName()));
|
if (1 === preg_match('/[^A-Za-z0-9_\s]/', $this->getName())) {
|
||||||
if ($contains_illegal_characters) {
|
|
||||||
throw new ProfileValidationError(
|
throw new ProfileValidationError(
|
||||||
'name',
|
'name',
|
||||||
E::ts('Only alphanumeric characters, space and the underscore (_) are allowed for profile names.'),
|
E::ts('Only alphanumeric characters, space and the underscore (_) are allowed for profile names.'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue