From f03d4901695651171c4737f96e9864754a9627b0 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 29 May 2015 14:14:26 +1200 Subject: [PATCH] CRM-16580 type check when returning user --- CRM/Core/Form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'); -- 2.25.1