Skip to content

Commit

Permalink
Fix for when localeData is null
Browse files Browse the repository at this point in the history
  • Loading branch information
SvanteRichter committed Aug 19, 2019
1 parent 8760d13 commit 6b4d4da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/EventListener/StorageListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6b4d4da

Please sign in to comment.