Merge pull request #19157 from jgrygierek/feature/add-missing-south-korea-state
[civicrm-core.git] / CRM / Upgrade / Incremental / SmartGroups.php
index 011c75a4cdd1531f3de9bd9f83f8764b4613a2a1..862eefe79d2f21b2574df85d064c813f6f2b5106 100644 (file)
@@ -13,7 +13,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
- *
  * Class to handled upgrading any saved searches with changed patterns.
  */
 class CRM_Upgrade_Incremental_SmartGroups {
@@ -232,12 +231,11 @@ class CRM_Upgrade_Incremental_SmartGroups {
    * @return mixed
    */
   protected function getSearchesWithField($field) {
-    $savedSearches = civicrm_api3('SavedSearch', 'get', [
+    return civicrm_api3('SavedSearch', 'get', [
       'options' => ['limit' => 0],
       'form_values' => ['LIKE' => "%{$field}%"],
+      'return' => ['id', 'form_values'],
     ])['values'];
-    return $savedSearches;
-
   }
 
   /**