From 41f2678e1db384629b937d121a1e689d93155ff4 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 26 Apr 2022 20:12:53 +0200 Subject: [PATCH] APIv4 - Prevent error when entity has no primary key --- Civi/Api4/Generic/AbstractSaveAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Civi/Api4/Generic/AbstractSaveAction.php b/Civi/Api4/Generic/AbstractSaveAction.php index 94b932efd3..d61718d646 100644 --- a/Civi/Api4/Generic/AbstractSaveAction.php +++ b/Civi/Api4/Generic/AbstractSaveAction.php @@ -204,7 +204,7 @@ abstract class AbstractSaveAction extends AbstractAction { 'action' => 'get', 'where' => [ ['type', 'IN', ['Field', 'Custom']], - ['name', 'NOT IN', CoreUtil::getInfoItem($this->getEntityName(), 'primary_key')], + ['name', 'NOT IN', (array) CoreUtil::getInfoItem($this->getEntityName(), 'primary_key')], ], ], ['name']); } -- 2.25.1