Skip to content

Commit bb7c878

Browse files
committed
Common regex in profile field check doesn't work #1484
1 parent 07b7e9d commit bb7c878

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adm_program/system/classes/ProfileFields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ public function setValue(string $fieldNameIntern, $fieldValue, $checkValue = tru
710710
}
711711

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

0 commit comments

Comments
 (0)