From: Seamus Lee Date: Thu, 11 Aug 2016 10:16:15 +0000 (+0000) Subject: CRM-19092 fix issue where can be '' rather than 0 so cid is not set properly X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=05ea7b60f80979341a917041789396034d6b0ea8;p=civicrm-core.git CRM-19092 fix issue where can be '' rather than 0 so cid is not set properly --- diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 042fb83cb1..447c4e315e 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1593,12 +1593,13 @@ class CRM_Core_Form extends HTML_QuickForm_Page { } // force to ignore the authenticated user - if ($tempID === '0' || $tempID === 0) { + if ($tempID === '0' || $tempID === 0 || $tempID === '') { // 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 // we don't really need to set it when $tempID is set because the params have that stored $this->set('cid', 0); + CRM_Core_Resources::singleton()->addVars('coreForm', array('contact_id' => (int) $tempID)); return (int) $tempID; }