Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Commit

Permalink
fix logic bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cklmercer committed Jul 18, 2016
1 parent a7259db commit b12209a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HasSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static function bootHasSettings()
});

self::saving(function ($model) {
if (property_exists($model, 'allowedSettings') && is_array($model->allowedSettings)) {
if ($model->settings && property_exists($model, 'allowedSettings') && is_array($model->allowedSettings)) {
$model->settings = array_only($model->settings, $model->allowedSettings);
}
});
Expand Down

0 comments on commit b12209a

Please sign in to comment.