Skip to content

Commit

Permalink
Fix unguarded checks spatie#1123
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrims0n authored Jan 24, 2023
1 parent 317eadb commit b5bcda7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Traits/LogsActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ public function shouldLogUnguarded(): bool
if (! $this->activitylogOptions->logUnguarded) {
return false;
}

// This case means model is unguarded
if ($this->isUnguarded()) {
return true;
}

// This case means all of the attributes are guarded
// so we'll not have any unguarded anyway.
Expand Down

0 comments on commit b5bcda7

Please sign in to comment.