X-Git-Url: https://git.p6c8.net/form-email.git/blobdiff_plain/a12d1127380f326264a1cb6b76fbee6fa31319c8..bd86302330d2811e018689abce0c4b640bf0b89a:/form-email/mailer.php diff --git a/form-email/mailer.php b/form-email/mailer.php index 11061d4..ff43112 100644 --- a/form-email/mailer.php +++ b/form-email/mailer.php @@ -7,7 +7,7 @@ # geschrieben wurde. # # Autor: Patrick Canterino -# Letzte Aenderung: 4.12.2011 +# Letzte Aenderung: 12.12.2011 # # Copyright (C) 2002-2011 Patrick Canterino # @@ -116,13 +116,23 @@ while(list($user_field,$user_field_data) = each($user_fields)) { if(isset($user_field_data['min']) && $user_field_data['min']) { if(strlen($user_field_content) < $user_field_data['min']) { - show_user_error($user_field_data['errors']['too_short']); + if(isset($user_field_data['errors']['too_short'])) { + show_user_error($user_field_data['errors']['too_short']); + } + else { + show_fatal($err_indiv_errmsg_miss,array('ERRMSG' => 'too_short', 'INDIVIDUAL' => $user_field)); + } } } if(isset($user_field_data['min']) && $user_field_data['max']) { if(strlen($user_field_content) > $user_field_data['max']) { - show_user_error($user_field_data['errors']['too_long']); + if(isset($user_field_data['errors']['too_long'])) { + show_user_error($user_field_data['errors']['too_long']); + } + else { + show_fatal($err_indiv_errmsg_miss,array('ERRMSG' => 'too_long', 'INDIVIDUAL' => $user_field)); + } } } @@ -130,7 +140,12 @@ while(list($user_field,$user_field_data) = each($user_fields)) { if(isset($user_field_data['check']) && $user_field_data['check'] != '') { if(function_exists($user_field_data['check']) && call_user_func($user_field_data['check'],$user_field_content) === false) { - show_user_error($user_field_data['errors']['check_fail']); + if(isset($user_field_data['errors']['check_fail'])) { + show_user_error($user_field_data['errors']['check_fail']); + } + else { + show_fatal($err_indiv_errmsg_miss,array('ERRMSG' => 'check_fail', 'INDIVIDUAL' => $user_field)); + } } } @@ -138,7 +153,12 @@ while(list($user_field,$user_field_data) = each($user_fields)) { if(isset($user_field_data['regex']) && $user_field_data['regex'] != '') { if(!preg_match($user_field_data['regex'],$user_field_content)) { - show_user_error($user_field_data['errors']['match_fail']); + if(isset($user_field_data['errors']['match_fail'])) { + show_user_error($user_field_data['errors']['match_fail']); + } + else { + show_fatal($err_indiv_errmsg_miss,array('ERRMSG' => 'match_fail', 'INDIVIDUAL' => $user_field)); + } } }