Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix validateAll to no longer support unused abort param #17544

Merged
merged 1 commit into from
Jun 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CRM/Contact/BAO/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) . " ) ) ";
}
}

Expand Down
11 changes: 9 additions & 2 deletions CRM/Utils/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down