From 6b4d4da30dc6e31869fa2fe550ef687edcd79732 Mon Sep 17 00:00:00 2001 From: SahAssar Date: Mon, 19 Aug 2019 13:32:34 +0200 Subject: [PATCH] Fix for when localeData is null --- src/EventListener/StorageListener.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/EventListener/StorageListener.php b/src/EventListener/StorageListener.php index e9cdc4b..8f690d9 100644 --- a/src/EventListener/StorageListener.php +++ b/src/EventListener/StorageListener.php @@ -266,6 +266,10 @@ public function postSave(StorageEvent $event) } $localeData = json_decode($subject[$localeSlug . 'data']); + if (is_null($localeData)) { + $localeData = []; + } + foreach ($localeData as $key => $value) { $subject->set($key, $value); }