From: Stéphane Jacob Date: Mon, 21 Mar 2011 18:09:11 +0000 (+0100) Subject: Removes call to deprecated ereg. X-Git-Tag: xorg/1.1.0~20 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=cf5cf754034b6982f6b8f6325c32ff27280bfad0;p=platal.git Removes call to deprecated ereg. Signed-off-by: Stéphane Jacob --- diff --git a/modules/platal.php b/modules/platal.php index 1fa6352..11b6b85 100644 --- a/modules/platal.php +++ b/modules/platal.php @@ -276,7 +276,7 @@ class PlatalModule extends PLModule return; } - if (!ereg('[0-3][0-9][0-1][0-9][1][9]([0-9]{2})', Env::v('birth'))) { + if (!preg_match('/^[0-3][0-9][0-1][0-9][1][9]([0-9]{2})$/', Env::v('birth'))) { $page->trigError('Date de naissance incorrecte ou incohérente'); return; }