CRM-21214 - Fix address sharing - undo
authorDaniël <9696905+DanielvV@users.noreply.github.com>
Fri, 29 Sep 2017 09:11:56 +0000 (11:11 +0200)
committerGitHub <noreply@github.com>
Fri, 29 Sep 2017 09:11:56 +0000 (11:11 +0200)
CRM/Core/BAO/Address.php

index 1d06932896b72cef21cff769f863a29c2cb2f14d..7ba998e4034c31620a31ca5c6cbb14e64088e865 100644 (file)
@@ -1012,7 +1012,7 @@ SELECT is_primary,
 
     // prevent an endless chain between two shared addresses (prevent chaining 3) CRM-21214
     if (CRM_Utils_Array::value('id', $params) == $params['master_id']) {
-      $params['master_id'] = NULL;
+      $params['master_id'] = '';
       CRM_Core_Session::setStatus(ts("You can't connect an address to itself"), '', 'warning');
     }
   }