From f76379034d64775d793439127585a486405a5229 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 8 Sep 2023 08:13:06 +1200 Subject: [PATCH] Ensure event ID is an integer --- CRM/Event/Tokens.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Event/Tokens.php b/CRM/Event/Tokens.php index 009bcfaaaa..7700beac45 100644 --- a/CRM/Event/Tokens.php +++ b/CRM/Event/Tokens.php @@ -148,7 +148,7 @@ class CRM_Event_Tokens extends CRM_Core_EntityTokens { * @throws \CRM_Core_Exception */ public function evaluateToken(TokenRow $row, $entity, $field, $prefetch = NULL) { - $eventID = $this->getFieldValue($row, 'id'); + $eventID = (int) $this->getFieldValue($row, 'id'); if (array_key_exists($field, $this->getEventTokenValues($eventID))) { foreach ($this->getEventTokenValues($eventID)[$field] as $format => $value) { $row->format($format)->tokens($entity, $field, $value ?? ''); -- 2.25.1