veda-consulting-company / uk.co.vedaconsulting.mailchimp

Other
22 stars 43 forks source link

Warning when running cron job #309

Open rmniemela opened 5 years ago

rmniemela commented 5 years ago

Am testing cron jobs now that I've updated to CiviCRM 5.8.2. Testing the CRON job with https://.../wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxx&pass=xxx&key=xxx.

Getting

Warning: Declaration of CRM_Mailchimp_Permission::check($permissions) should be compatible with CRM_Core_Permission::check($permissions, $contactId = NULL) in /home/xxx/public_html/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.mailchimp/CRM/Mailchimp/Permission.php on line 40 Sent Report mail has been sent.

Have not seen this before, although I've not tested the cron job via the http interface in quite a while.

How do I fix the warning?

rmniemela commented 5 years ago

Update: reset the webhook and nothing worked. No synchronization happening even though testing the webhook shows that it's getting correct Mailchimp account and email.

Also getting

Warning: invalid argument supplied for foreach() in /home/sudbu904/public_html/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.mailchimp/CRM/Mailchimp/Utils.php on line 228

sunnycs121 commented 4 years ago

I am also seeing same warning on page https://example.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Freport%2Finstance%2F10&reset=1&output=criteria

sunnycs121 commented 4 years ago

I fixed it for me by modifying permission.php file, added parameter $contactId in function "check" and initialized it with NULL.

From public static function check($permissions) { TO public static function check($permissions, $contactId = NULL) {