From: Jon Goldberg Date: Tue, 5 Dec 2023 16:33:53 +0000 (-0500) Subject: SearchKit: Don't assume a comparison value when none exists X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=46f53f9c69e54b3f47ddbb88972cdf4f3f011031;p=civicrm-core.git SearchKit: Don't assume a comparison value when none exists --- diff --git a/ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php b/ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php index 69acf8e3ff..75982ddf83 100644 --- a/ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php +++ b/ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php @@ -651,7 +651,7 @@ abstract class AbstractRunAction extends \Civi\Api4\Generic\AbstractAction { return \CRM_Core_Permission::check($permissions) == ($op !== '!='); } // Convert the conditional value of 'current_domain' into an actual value that filterCompare can work with - if ($item['condition'][2] === 'current_domain') { + if ($item['condition'][2] ?? '' === 'current_domain') { if (str_ends_with($item['condition'][0], ':label') !== FALSE) { $item['condition'][2] = \CRM_Core_BAO_Domain::getDomain()->name; }