diff --git a/src/bb-modules/Client/Api/Admin.php b/src/bb-modules/Client/Api/Admin.php index 1eea1470b..70e9c3489 100644 --- a/src/bb-modules/Client/Api/Admin.php +++ b/src/bb-modules/Client/Api/Admin.php @@ -312,7 +312,7 @@ class Admin extends \Api_Abstract $client->gender = $gender; } if(!is_null($birthday)) { - if (strtotime($data['birthday']) == false) { + if (strlen(trim($data['birthday'])) > 0 && strtotime($data['birthday']) == false) { throw new \Box_Exception('Invalid birth date value'); } $client->birthday = $birthday; diff --git a/src/bb-modules/Profile/Service.php b/src/bb-modules/Profile/Service.php index 4a2581699..d2034238f 100644 --- a/src/bb-modules/Profile/Service.php +++ b/src/bb-modules/Profile/Service.php @@ -151,7 +151,7 @@ class Service implements InjectionAwareInterface } if (isset($data['birthday'])) { - if (strtotime($data['birthday']) == false) { + if (strlen(trim($data['birthday'])) > 0 && strtotime($data['birthday']) == false) { throw new \Box_Exception('Invalid birth date value'); } $client->birthday = $data['birthday'];