/
Simplify kPasswordFormatter code
Simplify kPasswordFormatter code
I saw following code in kPasswordFormatter
code recently:
$error_msg = '+' . sprintf($this->Application->Phrase($phrase_error_prefix . '_passwords_too_short'), $min_length); // + -> not phrase $object->SetError($password_field, 'passwords_min_length', $error_msg);
This code can be simplified because kDBItem::SetError
method already supports substitutions in error messages (phrases or not):
$object->SetError($password_field, 'passwords_min_length', $phrase_error_prefix . '_passwords_too_short', array($min_length));