ensure search on survey results works properly
authorJamie McClelland <jm@mayfirst.org>
Fri, 5 Oct 2018 20:55:51 +0000 (16:55 -0400)
committerJamie McClelland <jm@mayfirst.org>
Fri, 5 Oct 2018 20:55:51 +0000 (16:55 -0400)
https://lab.civicrm.org/dev/core/issues/422

CRM/Activity/BAO/Query.php

index a450337ee2d42c5890303bd6c72b5fe9a7ea162b..e964a8aa13d9f088e58ef5c88c408a240f3bd334 100644 (file)
@@ -325,7 +325,7 @@ class CRM_Activity_BAO_Query {
       case 'activity_result':
         if (is_array($value)) {
           $safe = [];
-          foreach ($values as $id => $k) {
+          foreach ($value as $id => $k) {
             $safe[] = "'" . CRM_Utils_Type::escape($k, 'String') . "'";
           }
           $query->_where[$grouping][] = "civicrm_activity.result IN (" . implode(',', $safe) . ")";