aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profiles.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profiles.php')
-rw-r--r--mod/profiles.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/mod/profiles.php b/mod/profiles.php
index 28d8dd973..173d97138 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -200,6 +200,11 @@ function profiles_post(&$a) {
$day = intval($_POST['day']);
if(($day > $mtab[$month]) || ($day < 0))
$day = 0;
+
+ if($year && (! ($month && $day))) {
+ $month = 1; $day = 1;
+ }
+
$dob = '0000-00-00';
$dob = sprintf('%04d-%02d-%02d',$year,$month,$day);