Skip to content

Commit

Permalink
Check if state data isset before looping through it (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
jyrkidn authored Aug 30, 2024
1 parent 11a44ce commit 7c04593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Forms/TranslatableTabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function dehydrateState(array &$state, bool $isDehydrated = true): void

$model = app($this->getModel());

foreach (Arr::except($state['data'], $model->getFillable()) as $locale => $values) {
foreach (Arr::except($state['data'] ?? [], $model->getFillable()) as $locale => $values) {
if (! is_array($values)) {
continue;
}
Expand Down

0 comments on commit 7c04593

Please sign in to comment.