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

Other
22 stars 43 forks source link

permission error in Drupal 7, Civi 5.10.4 #319

Closed ericfg closed 5 years ago

ericfg commented 5 years ago

with civi 5.10.4, Drupal 7.x and php 7.1 there is a warning that in some cases turns into a fatal error that will prevent the webhooks from working

Declaration of CRM_Mailchimp_Permission::check($permissions) should be compatible with CRM_Core_Permission::check($permissions, $contactId = NULL) in <b>/path/to/uk.co.vedaconsulting.mailchimp-2.0.1/CRM/Mailchimp/Permission.php

CiviVolunteer had a similar issue, following the example in that fix I was able to get mailchimp extension working. https://github.com/civicrm/org.civicrm.volunteer/pull/477/files

I'll submit a pull request soon but in the meantime if anyone is having the same issue the fix is

remove: class CRM_Mailchimp_Permission extends CRM_Core_Permission { add: class CRM_Mailchimp_Permission {

and

remove: return parent::check($permissions); add: return CRM_Core_Permission::check($permissions,NULL);