diff --git a/webht/third_party/vendorPlanSync/helpers/array_helper.php b/webht/third_party/vendorPlanSync/helpers/array_helper.php index 2f6ec50f..7ec980a7 100644 --- a/webht/third_party/vendorPlanSync/helpers/array_helper.php +++ b/webht/third_party/vendorPlanSync/helpers/array_helper.php @@ -169,7 +169,7 @@ function real_phone_number($phone, $nation_code) function calc_age($birthday) { $now = new DateTime(); - $birth = new DateTime(strstr($birthday, " ", TRUE)); + $birth = new DateTime($birthday); $date_d = $now->diff($birth); $d_t = ($date_d->format("%y")); return $d_t; @@ -181,7 +181,7 @@ function calc_age_type($birthday) return 1; } $age = calc_age($birthday); - if ($age < 18) { + if ($age > 0 && $age < 18) { return 2; } return 1;