From: Eileen McNaughton Date: Mon, 27 Mar 2023 20:08:02 +0000 (+1300) Subject: Cast metadata to string, as it would hit deprecation notice on null X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0c3f1fa71a11e27f6e69ff0b72da00df45646056;p=civicrm-core.git Cast metadata to string, as it would hit deprecation notice on null --- 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; }