Skip to content

Commit

Permalink
Merge pull request #16118 from marcusmoore/fixes/undefined-key-in-ass…
Browse files Browse the repository at this point in the history
…et-observer
  • Loading branch information
snipe authored Jan 22, 2025
2 parents 36f460d + 8f512e5 commit e53ed23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Observers/AssetObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function updating(Asset $asset)
$changed = [];

foreach ($asset->getRawOriginal() as $key => $value) {
if ($asset->getRawOriginal()[$key] != $asset->getAttributes()[$key]) {
if ((array_key_exists($key, $asset->getAttributes())) && ($asset->getRawOriginal()[$key] != $asset->getAttributes()[$key])) {
$changed[$key]['old'] = $asset->getRawOriginal()[$key];
$changed[$key]['new'] = $asset->getAttributes()[$key];
}
Expand Down

0 comments on commit e53ed23

Please sign in to comment.