From: Eileen McNaughton Date: Fri, 29 May 2015 02:14:26 +0000 (+1200) Subject: CRM-16580 type check when returning user X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f03d4901695651171c4737f96e9864754a9627b0;p=civicrm-core.git CRM-16580 type check when returning user --- diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 51d47be869..76cc6ba2d1 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1621,7 +1621,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { return $tempID; } - return $userID; + return is_numeric($userID) ? $userID : NULL; } /** @@ -1847,7 +1847,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { if (!$options) { $targetField->setAttribute('placeholder', $targetField->getAttribute('data-none-prompt')); } - } + } else { $targetField->setAttribute('placeholder', $targetField->getAttribute('data-empty-prompt')); $targetField->setAttribute('disabled', 'disabled');