From 078442719c3eecf81bc4efa153984fb8e0fd31f3 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 26 Apr 2024 17:28:02 +0200 Subject: [PATCH] Set the Google attendee data only if all the values are available --- application/libraries/Google_sync.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/libraries/Google_sync.php b/application/libraries/Google_sync.php index fb2e4e08..42ea5c5c 100644 --- a/application/libraries/Google_sync.php +++ b/application/libraries/Google_sync.php @@ -181,7 +181,7 @@ class Google_sync $event_provider->setEmail($provider['email']); $event->attendees[] = $event_provider; - if (!empty($customer)) { + if (!empty($customer['first_name']) && !empty($customer['last_name']) && !empty($customer['email'])) { $event_customer = new Google_Service_Calendar_EventAttendee(); $event_customer->setDisplayName($customer['first_name'] . ' ' . $customer['last_name']); $event_customer->setEmail($customer['email']); @@ -243,7 +243,7 @@ class Google_sync $event_provider->setEmail($provider['email']); $event->attendees[] = $event_provider; - if (!empty($customer)) { + if (!empty($customer['first_name']) && !empty($customer['last_name']) && !empty($customer['email'])) { $event_customer = new Google_Service_Calendar_EventAttendee(); $event_customer->setDisplayName($customer['first_name'] . ' ' . $customer['last_name']); $event_customer->setEmail($customer['email']);