projects
/
platal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb31ee6
)
Fix bug when user entered a birthdate on 2 digits during regisstration
author
Aymeric Augustin
<aymeric.augustin@m4x.org>
Sun, 9 Mar 2008 16:41:41 +0000
(17:41 +0100)
committer
Aymeric Augustin
<aymeric.augustin@m4x.org>
Sun, 9 Mar 2008 16:42:41 +0000
(17:42 +0100)
modules/register.php
patch
|
blob
|
blame
|
history
diff --git
a/modules/register.php
b/modules/register.php
index
69a8ae5
..
ee95c8f
100644
(file)
--- a/
modules/register.php
+++ b/
modules/register.php
@@
-148,8
+148,10
@@
class RegisterModule extends PLModule
$err[] = "La 'Date de naissance' n'est pas correcte.";
} else {
$birth = explode('/', $birth, 3);
- $year = intval($birth[2]);
- if ($year < 100) $year += 1900;
+ for ($i = 0; $i < 3; $i++)
+ $birth[$i] = intval($birth[$i]);
+ if ($birth[2] < 100) $birth[2] += 1900;
+ $year = $birth[2];
$promo = (int)$sub_state['promo'];
if ($year > $promo - 15 || $year < $promo - 30) {
$err[] = "La 'Date de naissance' n'est pas correcte.";