From 26e09e3b7f66bff0f7388906f806819e72a05908 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 20 Apr 2022 20:21:29 -0400 Subject: [PATCH] APIv4 - Avoid php error Prevents a php error when calling `array_merge()` on `null`. --- Civi/Api4/Query/Api4SelectQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Civi/Api4/Query/Api4SelectQuery.php b/Civi/Api4/Query/Api4SelectQuery.php index 68a624428c..a7de66a00f 100644 --- a/Civi/Api4/Query/Api4SelectQuery.php +++ b/Civi/Api4/Query/Api4SelectQuery.php @@ -219,7 +219,7 @@ class Api4SelectQuery { } else { if ($this->forceSelectId) { - $keys = CoreUtil::getInfoItem($this->getEntity(), 'primary_key'); + $keys = (array) CoreUtil::getInfoItem($this->getEntity(), 'primary_key'); $select = array_merge($keys, $select); } -- 2.25.1