Skip to content

Commit

Permalink
check for hidden property with shorter syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
pheeque committed Apr 30, 2021
1 parent 92986b7 commit 1c0a7ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mpociot/Versionable/VersionableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ protected function versionablePostSave()
$version->versionable_type = get_class($this);
$version->user_id = $this->getAuthUserId();

$versionedHiddenFields = isset($this->versionedHiddenFields) ? $this->versionedHiddenFields : [];
$versionedHiddenFields = $this->versionedHiddenFields ?? [];
$this->makeVisible($versionedHiddenFields);
$version->model_data = serialize($this->attributesToArray());
$this->makeHidden($versionedHiddenFields);
Expand Down

0 comments on commit 1c0a7ae

Please sign in to comment.