Prevents impossible grad years to be stored.
authorStéphane Jacob <sj@m4x.org>
Sat, 26 Jun 2010 07:44:53 +0000 (09:44 +0200)
committerStéphane Jacob <sj@m4x.org>
Sat, 26 Jun 2010 07:44:53 +0000 (09:44 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/profile/general.inc.php

index 95bd977..b6d77ff 100644 (file)
@@ -260,6 +260,7 @@ class ProfileSettingEdu implements ProfileSetting
             foreach ($value as $key=>&$edu) {
                 if (($edu['grad_year'] < 1921) || ($edu['grad_year'] > (date('Y') + 4))) {
                     Platal::page()->trigWarning('L\'année d\'obtention du diplôme est mal ou non renseignée, elle doit être du type : 2004.');
+                    $edu['grad_year'] = null;
                     $edu['warning'] = true;
                 }
                 if ($key != $i) {