diff --git a/Civi/RemoteTools/Api4/Api4.php b/Civi/RemoteTools/Api4/Api4.php index c86a0a8..bfcda42 100644 --- a/Civi/RemoteTools/Api4/Api4.php +++ b/Civi/RemoteTools/Api4/Api4.php @@ -40,7 +40,7 @@ public function __construct() { self::$instance = $this; } - public function countEntities(string $entityName, ConditionInterface $where, array $options): int { + public function countEntities(string $entityName, ConditionInterface $where, array $options = []): int { return $this->execute($entityName, 'get', [ 'checkPermissions' => $options['checkPermissions'] ?? FALSE, 'select' => ['row_count'], diff --git a/Civi/RemoteTools/Api4/Api4Interface.php b/Civi/RemoteTools/Api4/Api4Interface.php index e97adba..024b186 100644 --- a/Civi/RemoteTools/Api4/Api4Interface.php +++ b/Civi/RemoteTools/Api4/Api4Interface.php @@ -38,7 +38,7 @@ interface Api4Interface { * * @throws \CRM_Core_Exception */ - public function countEntities(string $entityName, ConditionInterface $where, array $options): int; + public function countEntities(string $entityName, ConditionInterface $where, array $options = []): int; /** * @param array $params