Skip to content

Commit

Permalink
Common regex in profile field check doesn't work #1484
Browse files Browse the repository at this point in the history
  • Loading branch information
Fasse committed Sep 22, 2023
1 parent 07b7e9d commit bb7c878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adm_program/system/classes/ProfileFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ public function setValue(string $fieldNameIntern, $fieldValue, $checkValue = tru
}

if($this->mProfileFields[$fieldNameIntern]->getValue('usf_regex') !== ''
&& preg_match($this->mProfileFields[$fieldNameIntern]->getValue('usf_regex'), $fieldValue) === 0) {
&& preg_match('/'.$this->mProfileFields[$fieldNameIntern]->getValue('usf_regex').'/', $fieldValue) === 0) {
throw new AdmException($gL10n->get('SYS_FIELD_INVALID_REGEX', array($this->mProfileFields[$fieldNameIntern]->getValue('usf_name'))));
}
}
Expand Down

0 comments on commit bb7c878

Please sign in to comment.