Fix validateAll to no longer support unused abort param
authoreileen <emcnaughton@wikimedia.org>
Mon, 8 Jun 2020 01:11:02 +0000 (13:11 +1200)
committereileen <emcnaughton@wikimedia.org>
Mon, 8 Jun 2020 01:11:02 +0000 (13:11 +1200)
Default of TRUE is good here

CRM/Contact/BAO/Query.php
CRM/Utils/Type.php

index 694f6a84d420a3fdc6f2ae0baf8a2142ca97b44a..2e1090d5f76ca13ebce542a8accec248f7100a75 100644 (file)
@@ -3696,7 +3696,7 @@ WHERE  $smartGroupClause
     }
     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) . " ) ) ";
     }
   }
 
index 54abc84763e947b62494af3c8f3b718c43526f90..b4c14be1e2bdf51e1f5f9649dce1cbedfe4227bc 100644 (file)
@@ -196,11 +196,18 @@ class CRM_Utils_Type {
   /**
    * 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;
   }