Answers.Body: <p>I took a  look &amp; I think you are probably on a higher php version than we are testing with - this patch should address it for you
  <a href="https://github.com/civicrm/civicrm-core/pull/27363" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/27363</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-09T10:40:01.607Z
Answers.Text: This solves the issue, thanks to @eileen. Cron and web is running on php 8.0.30.
Answers.UserDisplayName: lbl
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-07T20:15:41.077Z
Answers.LastActivityDate: 2023-09-07T20:15:41.077Z
Answers.UserDisplayName: eileen
Body: <p>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:</p>
  <pre><code>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
  </code></pre>
  <p>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.</p>
  <p>I would appreciate any advice.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-09-07T13:26:43.800Z
Comments.Text: 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.
Comments.UserDisplayName: Coleman
Tags: <tokens><scheduled-reminders><cron-job>
Title: $EventID is string, not int
ThreadText: # $EventID is string, not int
  
  (Asked by: username_0 on 2023-09-07)
  
  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.
  
  **Tags:** tokens, scheduled-reminders, cron-job
  
  > **Comments:**
  > **username_1**: 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.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-09-07. Score: 3
  
  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>
  
  > **Comments:**
  > **username_0**: This solves the issue, thanks to @username_2. Cron and web is running on php 8.0.30.  
  
  ---
  
  