From 018f6c9f3c005dd48ff9128ff1c67148b721f88a Mon Sep 17 00:00:00 2001 From: janw Date: Fri, 17 Nov 2006 08:22:54 +0000 Subject: [PATCH] Bugfix: save() cause an error about dateOfBirth, if generic page has not been loaded. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5146 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/generic/class_user.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 862c4cc9a..157bbbf71 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -729,7 +729,10 @@ class user extends plugin plugin::save (); if ($this->use_dob == "1"){ - $this->attrs['dateOfBirth'] = date("Y-m-d", $this->dateOfBirth); + /* If it is an array, the generic page has never been loaded - so there's no difference. Using an array would cause an error btw. */ + if(!is_array($this->attrs['dateOfBirth'])) { + $this->attrs['dateOfBirth'] = date("Y-m-d", $this->dateOfBirth); + } } /* Remove additional objectClasses */ -- 2.30.2