Fatal error for rules cron scheduled job after upgrading to 3.5 from 3.2
After upgrading to CiviRules 3.5 from 3.2, the rules cron encounters a fatal error. The installation has 3 rules, each of which is triggered by members being members of a smart group, e.g.:
Daily trigger for group members
Daily trigger for all members of group [GROUP NAME]
The rules look at a couple of tag conditions and then apply/remove tags as needed. This issue prevents the cron from running successfully.
Error message
Fatal error: Uncaught Error: Cannot assign null to property CRM_Civirules_TriggerData_TriggerData::$entity_id of type int
in /www/domain/public_html/wp-content/uploads/civicrm/ext/org.civicoop.civirules/CRM/Civirules/TriggerData/TriggerData.php on line 93
Call stack:
CRM_Civirules_TriggerData_TriggerData::setEntityId()
wp-content/uploads/civicrm/ext/org.civicoop.civirules/CRM/Civirules/Engine.php:28
CRM_Civirules_Engine::triggerRule()
wp-content/uploads/civicrm/ext/org.civicoop.civirules/CRM/Civirules/Trigger/Cron.php:35
CRM_Civirules_Trigger_Cron::process()
wp-content/uploads/civicrm/ext/org.civicoop.civirules/api/v3/Civirules/Cron.php:32
civicrm_api3_civirules_cron()
wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php:89
Civi\A\P\MagicFunctionProvider::invoke()
wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php:156
Civi\API\Kernel::runRequest()
wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php:79
Civi\API\Kernel::runSafe()
wp-content/plugins/civicrm/civicrm/api/api.php:28
civicrm_api()
wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php:135
CRM_Core_JobManager::executeJob()
wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php:73
CRM_Core_JobManager::execute()
wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php:1803
CRM_Utils_System::executeScheduledJobs()
wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:291
CRM_Core_Invoke::runItem()
wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69
CRM_Core_Invoke::_invoke()
wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36
CRM_Core_Invoke::invoke()
wp-content/plugins/civicrm/civicrm.php:1231
CiviCRM_For_WordPress::invoke()
wp-includes/class-wp-hook.php:324
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:348
WP_Hook::do_action()
wp-includes/plugin.php:517
do_action()
wp-admin/admin.php:259
Platform info
WordPress: latest
CiviCRM: 5.72.1
Civirules: 3.5
PHP: 8.1