From: benjamin Date: Tue, 9 Jan 2024 21:44:18 +0000 (+0000) Subject: conditional operator precedence fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5644475a9f5218744e3b99aa6ee0bc9c01877a0d;p=civicrm-core.git conditional operator precedence fix --- 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; }