From 5644475a9f5218744e3b99aa6ee0bc9c01877a0d Mon Sep 17 00:00:00 2001 From: benjamin Date: Tue, 9 Jan 2024 21:44:18 +0000 Subject: [PATCH] conditional operator precedence fix --- .../Civi/Api4/Action/SearchDisplay/AbstractRunAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php b/ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php index 75982ddf83..f040724ba0 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; } -- 2.25.1