diff --git a/app/Observers/AssetObserver.php b/app/Observers/AssetObserver.php index 421a93b9d7d..b44d098123b 100644 --- a/app/Observers/AssetObserver.php +++ b/app/Observers/AssetObserver.php @@ -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]; }