From 830652769f5e756edb7239dc048a0d52c893d348 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sat, 26 Jun 2010 09:44:53 +0200 Subject: [PATCH] Prevents impossible grad years to be stored. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- modules/profile/general.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/profile/general.inc.php b/modules/profile/general.inc.php index 95bd977..b6d77ff 100644 --- a/modules/profile/general.inc.php +++ b/modules/profile/general.inc.php @@ -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) { -- 2.1.4