2

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 /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);

if interested, issue in the extension's github is https://github.com/veda-consulting/uk.co.vedaconsulting.mailchimp/issues/319

1 Answer 1

3

patch:

index 5b82f65e..76c816dc 100644
--- a/uk.co.vedaconsulting.mailchimp-2.0.1/CRM/Mailchimp/Permission.php
+++ b/uk.co.vedaconsulting.mailchimp-2.0.1/CRM/Mailchimp/Permission.php
@@ -1,6 +1,6 @@
 <?php

-class CRM_Mailchimp_Permission extends CRM_Core_Permission {
+class CRM_Mailchimp_Permission {

   /**
    * Returns an array of permissions defined by this extension. Modeled off of
@@ -35,6 +35,6 @@ class CRM_Mailchimp_Permission extends CRM_Core_Permission {
         }
       });
     }
-    return parent::check($permissions);
+    return CRM_Core_Permission::check($permissions,NULL);
   }
 }
3

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.