Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.7
-
Fix Version/s: 4.3.0
-
Component/s: Drupal Integration Modules
-
Labels:None
Description
Consistently receive an error on login to Drupal:
"Notice: Undefined variable: op in civicrm_member_roles_sync_user() (line 111 of/var/www/fdby/sites/all/modules/civicrm/drupal/modules/civicrm_member_roles/civicrm_member_roles.module)."
In the stated file, the method at line 111 is called from the Drupal hook on login and reads:
function civicrm_member_roles_sync_user($account) {
104 if (!civicrm_initialize())
107 if (variable_get('civicrm_member_roles_sync_method', 0) == 0)
{ 108 _civicrm_member_roles_sync($account->uid); 109 } 110 if (variable_get('civicrm_member_roles_sync_method', 0) == 3) {
111 if ($op == 'insert')
114 }
115 }
This looks like it might be a copy-and-paste error from the method at the bottom of the file "civicrm_member_roles_civicrm_post", which does h ave a variable "$op", presumably used to gauge the type of operation happening during the membership status change.
I don't really know enough about the inner workings of Civi to propose a solution. I am going to comment out the check, and syncs will happen at login and logout, and on membership changes, which is fine with me in my situation.