From 95325bb83661032f9d73ef1268cdf80bb5ce4549 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 8 Jun 2020 13:11:02 +1200 Subject: [PATCH] Fix validateAll to no longer support unused abort param Default of TRUE is good here --- CRM/Contact/BAO/Query.php | 2 +- CRM/Utils/Type.php | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 694f6a84d420..2e1090d5f76c 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -3696,7 +3696,7 @@ public function includeContactIDs() { } CRM_Utils_Type::validateAll($contactIds, 'Positive'); if (!empty($contactIds)) { - $this->_where[0][] = " ( contact_a.id IN (" . implode(',', $contactIds) . " ) ) "; + $this->_where[0][] = ' ( contact_a.id IN (' . implode(',', $contactIds) . " ) ) "; } } diff --git a/CRM/Utils/Type.php b/CRM/Utils/Type.php index 54abc84763e9..b4c14be1e2bd 100644 --- a/CRM/Utils/Type.php +++ b/CRM/Utils/Type.php @@ -196,11 +196,18 @@ public static function escapeAll($data, $type, $abort = TRUE) { /** * Helper function to call validate on arrays * + * @param mixed $data + * @param string $type + * + * @return mixed + * + * @throws \CRM_Core_Exception + * * @see validate */ - public static function validateAll($data, $type, $abort = TRUE) { + public static function validateAll($data, $type) { foreach ($data as $key => $value) { - $data[$key] = CRM_Utils_Type::validate($value, $type, $abort); + $data[$key] = CRM_Utils_Type::validate($value, $type); } return $data; }