mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-22 04:53:46 +09:00
do not validate empty birthday value
This commit is contained in:
1 parent
1ba147576a
commit
0244a22c07
2 files changed
+2
-2
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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'];
|
||||
|
||||
Reference in new issue
Block a user