christianwach / civicrm-wp-member-sync

CiviCRM WordPress Member Sync plugin keeps a WordPress user in sync with a CiviCRM membership by granting either a role or capabilities to a WordPress user who has that membership.
https://wordpress.org/plugins/civicrm-wp-member-sync/
GNU General Public License v2.0
17 stars 10 forks source link

PHP 7 #15

Closed sportman1280 closed 7 years ago

sportman1280 commented 7 years ago

Plugin does not seem to be PHP 7.0 compatible, as I receive errors when activating it.

Error Message: Fatal error: 'break' not in the 'loop' or 'switch' context in /var/www/html/wp-content/plugins/civicrm-wp-member-sync/civi-wp-ms-admin.php on line 1583

christianwach commented 7 years ago

@sportman1280 Thanks for the report - looks like the break statement was left over from a previous refactoring. You can comment that line out until I roll out a new version.

sportman1280 commented 7 years ago

Yep, my resolution was to comment out the breaks.

christianwach commented 7 years ago

@sportman1280 Does this commit work for you now? I'll push to the WordPress repo if so.

christianwach commented 7 years ago

@sportman1280 I ask because I have heard that CiviCRM itself can be, ahem, fickle when running under PHP 7 - one of the reasons I do not do so as yet. I'm going to push the update to the WordPress repo anyway, in case others encounter this.

Thanks again.

sportman1280 commented 7 years ago

@christianwach that worked! I just upgraded to PHP 7 today, we'll see how it goes

christianwach commented 7 years ago

@sportman1280 Good news. Thanks again for the report.