CRM-19348 - membership-api: max_related is ignored
authorPatel Nainesh <patelnainesh222@users.noreply.github.com>
Tue, 13 Sep 2016 14:47:51 +0000 (20:17 +0530)
committerGitHub <noreply@github.com>
Tue, 13 Sep 2016 14:47:51 +0000 (20:17 +0530)
CRM/Member/BAO/Membership.php

index 99852be14d571881ee77639b2e18f41fb42df5f8..1805b76426d879bf0bbe7da85c1504b0a6260314 100644 (file)
@@ -284,7 +284,7 @@ class CRM_Member_BAO_Membership extends CRM_Member_DAO_Membership {
     // data cleanup only: all verifications on number of related memberships are done upstream in:
     // CRM_Member_BAO_Membership::createRelatedMemberships()
     // CRM_Contact_BAO_Relationship::relatedMemberships()
-    if (isset($params['owner_membership_id'])) {
+    if (!empty($params['owner_membership_id'])) {
       unset($params['max_related']);
     }
     else {