From b2a7bb3b88711832be72842cc2ac93c3caadd132 Mon Sep 17 00:00:00 2001 From: Aday Bujeda Date: Thu, 23 May 2024 15:59:37 +0100 Subject: [PATCH] Fixed possible undefined property when logging the email template key --- pprOjsPlugin/services/email/PPRFirstNameEmailService.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pprOjsPlugin/services/email/PPRFirstNameEmailService.inc.php b/pprOjsPlugin/services/email/PPRFirstNameEmailService.inc.php index a4147ef..874e2d7 100644 --- a/pprOjsPlugin/services/email/PPRFirstNameEmailService.inc.php +++ b/pprOjsPlugin/services/email/PPRFirstNameEmailService.inc.php @@ -94,7 +94,8 @@ function addFirstNamesToEmailTemplate($hookName, $arguments) { error_log("PPR[PPRFirstNameEmailService] processing emailTemplate={$emailTemplate->emailKey}"); $this->pprObjectFactory->firstNamesManagementService()->addFirstNamesToEmailTemplate($emailTemplate); } else { - error_log("PPR[PPRFirstNameEmailService] notSupported emailTemplate={$emailTemplate->emailKey}"); + $emailKey = $emailTemplate->emailKey ?? 'N/A'; + error_log("PPR[PPRFirstNameEmailService] notSupported emailTemplate={$emailKey}"); } return false;