From 1c51437569f2efbe0cb1cae5bbd65518b6c9f371 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Thu, 7 May 2009 15:28:52 +0200 Subject: [PATCH] Fixed bad sequence of the tests. --- src/IDF/Form/Admin/UserUpdate.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/IDF/Form/Admin/UserUpdate.php b/src/IDF/Form/Admin/UserUpdate.php index a5b6502..6859859 100644 --- a/src/IDF/Form/Admin/UserUpdate.php +++ b/src/IDF/Form/Admin/UserUpdate.php @@ -179,13 +179,13 @@ class IDF_Form_Admin_UserUpdate extends Pluf_Form function clean_first_name() { $first_name = trim($this->cleaned_data['first_name']); + if ($first_name == '---') { + throw new Pluf_Form_Invalid(__('--- is not a valid first name.')); + } if ($first_name == mb_strtoupper($first_name)) { $first_name = mb_convert_case(mb_strtolower($first_name), MB_CASE_TITLE, 'UTF-8'); } - if ($first_name == '---') { - throw new Pluf_Form_Invalid(__('--- is not a valid first name.')); - } return $first_name; }