I'm having issues with the scheduled reminder function. I have set up an email to be sent out 96 hours before the event start date. When configuring the reminders, the system throws errors in the cron job. It complains that the $EventID is delivered as a string instead of an integer. Here's the error message:

PHP Fatal error: Uncaught TypeError: CRM_Event_Tokens::getEventTokenValues(): Argument #1 ($eventID) must be of type ?int, string given, called in /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Event/Tokens.php on line 95 and defined in var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Event/Tokens.php:115

The error occurs long before the scheduled time is reached. However, the definition is given as an integer on line 115. As you can see, I'm using WP with CiviCRM 5.59.4.

I would appreciate any advice.

  • There is a mandatory security upgrade for CiviCRM, so 5.59.x is no longer supported. After you upgrade please check and see if the issue is still a problem, as there have been quite a few recent improvements in the token system.
    – Coleman
    Sep 7, 2023 at 13:26

1 Answer 1


I took a look & I think you are probably on a higher php version than we are testing with - this patch should address it for you https://github.com/civicrm/civicrm-core/pull/27363

  • This solves the issue, thanks to @eileen. Cron and web is running on php 8.0.30.
    – lbl
    Sep 9, 2023 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.