From 0c3f1fa71a11e27f6e69ff0b72da00df45646056 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 28 Mar 2023 09:08:02 +1300 Subject: [PATCH] Cast metadata to string, as it would hit deprecation notice on null --- ext/civiimport/Civi/Api4/Event/Subscriber/ImportSubscriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/civiimport/Civi/Api4/Event/Subscriber/ImportSubscriber.php b/ext/civiimport/Civi/Api4/Event/Subscriber/ImportSubscriber.php index 069fc9f272..34c7381407 100644 --- a/ext/civiimport/Civi/Api4/Event/Subscriber/ImportSubscriber.php +++ b/ext/civiimport/Civi/Api4/Event/Subscriber/ImportSubscriber.php @@ -122,7 +122,7 @@ class ImportSubscriber extends AutoService implements EventSubscriberInterface { */ private function getImportTableFromEvent(GenericHookEvent $event): ?string { if (isset($event->object)) { - $metadata = json_decode($event->object->metadata, TRUE); + $metadata = json_decode((string) $event->object->metadata, TRUE); if (!is_array($metadata)) { return NULL; } -- 2.25.1