Conflicts:
CRM/Utils/Type.php
break;
case 'Positive':
- // the below 2 are for custom fields of this type
- // CRM-8925
+ // CRM-8925 the 3 below are for custom fields of this type
case 'Country':
case 'StateProvince':
+ // Checked for multi valued state/country value
+ if (is_array($data)) {
+ $returnData = TRUE;
+ foreach ($data as $data) {
+ if (CRM_Utils_Rule::positiveInteger($data) || CRM_Core_DAO::escapeString($data)) {
+ $returnData = TRUE;
+ }
+ else {
+ $returnData = FALSE;
+ }
+ }
+ if ($returnData) {
+ return $data;
+ }
+ }
+ elseif (!is_numeric($data) && CRM_Core_DAO::escapeString($data)) {
+ return $data;
+ }
+ elseif (CRM_Utils_Rule::positiveInteger($data)) {
+ return $data;
+ }
+ break;
+
+ case 'File':
+ if (CRM_Utils_Rule::positiveInteger($data)) {
+ return $data;
+ }
+ break;
+
case 'Link':
if (CRM_Utils_Rule::url($data = trim($data))) {
return $data;