CRM-19092 move switch to fix for CRM-17844
authorSeamus Lee <seamuslee001@gmail.com>
Thu, 11 Aug 2016 10:29:58 +0000 (10:29 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 11 Aug 2016 10:29:58 +0000 (10:29 +0000)
CRM/Core/Form.php

index 447c4e315e7ce9df070e5d72c6e8b0bafd3b5e84..dd6a59cc631c63a3563ae65681788fa57d7ad1ba 100644 (file)
@@ -1584,7 +1584,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
    */
   public function getContactID() {
     $tempID = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
-    if (isset($this->_params) && isset($this->_params['select_contact_id'])) {
+    if (isset($this->_params) && !empty($this->_params['select_contact_id'])) {
       $tempID = $this->_params['select_contact_id'];
     }
     if (isset($this->_params, $this->_params[0]) && !empty($this->_params[0]['select_contact_id'])) {
@@ -1593,7 +1593,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
     }
 
     // force to ignore the authenticated user
-    if ($tempID === '0' || $tempID === 0 || $tempID === '') {
+    if ($tempID === '0' || $tempID === 0) {
       // we set the cid on the form so that this will be retained for the Confirm page
       // in the multi-page form & prevent us returning the $userID when this is called
       // from that page