Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.4.4, 4.0.4
-
Component/s: Core CiviCRM
-
Labels:None
Description
I can't reproduce this problem with all my contacts, but only with some of them.
I'm editing a contact, adding a second employee of relationship, and when I validate I obtain :
Notice : Undefined variable: relTypeIds dans CRM_Contact_BAO_Relationship::relatedMemberships() (ligne 1173 dans /var/www/drupal/sites/all/modules/civicrm/CRM/Contact/BAO/Relationship.php).
Warning : Invalid argument supplied for foreach() dans CRM_Contact_BAO_Relationship::relatedMemberships() (ligne 1173 dans /var/www/drupal/sites/all/modules/civicrm/CRM/Contact/BAO/Relationship.php).
Any case, there's a problem with the fact that relTypeIds is used while we're not sure it's initialized.
Not diving deep into the code, I'd propose adding a simple :
$relTypeIds = array( );
line 1131 of the civicrm/CRM/Contact/BAO/Relationship.php file (correct the problem).
Note : it's a non blocking bug