From e331c692bbdf6857adae58ae90fc2f836aa1c59a Mon Sep 17 00:00:00 2001 From: Tb Fajri Date: Fri, 19 Jan 2024 08:48:08 +0700 Subject: [PATCH] update --- Modules/Internal/Services/MemberEnrollmentService.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Modules/Internal/Services/MemberEnrollmentService.php b/Modules/Internal/Services/MemberEnrollmentService.php index 16d9f3cf..4aa24464 100644 --- a/Modules/Internal/Services/MemberEnrollmentService.php +++ b/Modules/Internal/Services/MemberEnrollmentService.php @@ -341,11 +341,14 @@ class MemberEnrollmentService if ($date_from_row instanceof DateTime) { return $date_from_row->format('Y-m-d'); } else if ($date_from_row != null) { - return date('Y-m-d', strtotime($date_from_row)); + if (strtotime($date_from_row)){ + return date('Y-m-d', strtotime($date_from_row)); + } else { + throw new ImportRowException(__('Format Date Invalid'), 0, null, $row); + } } else { - return null; + throw new ImportRowException(__('Format Date Invalid'), 0, null, $row); } - } public function validateDate($dateString, $dateFormat = 'Ymd'){