CRM-16580 type check when returning user
authorEileen McNaughton <eileen@fuzion.co.nz>
Fri, 29 May 2015 02:14:26 +0000 (14:14 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Fri, 29 May 2015 02:55:38 +0000 (14:55 +1200)
CRM/Core/Form.php

index 51d47be869d82abb7b23a4714902fb2888450601..76cc6ba2d1047fb2ab5c8114dcc5993c4d12ae4a 100644 (file)
@@ -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');