Skip to content

Commit c4b8067

Browse files
FIX: Data lookup resiliency.
1 parent 20dc7e1 commit c4b8067

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/Snapshot.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ public function getActivityDescription(): string
145145
{
146146
/** @var SnapshotItem $item */
147147
$item = $this->getOriginItem();
148-
$entry = ActivityEntry::singleton()->createFromSnapshotItem($item);
148+
$entry = $item
149+
? ActivityEntry::singleton()->createFromSnapshotItem($item)
150+
: null;
149151
$key = sprintf('%s.ACTIVITY_NONE', Snapshot::class);
150152
$default = _t($key, 'none');
151153

@@ -198,7 +200,9 @@ public function getActivityType(): ?string
198200
{
199201
/** @var SnapshotItem $item */
200202
$item = $this->getOriginItem();
201-
$entry = ActivityEntry::singleton()->createFromSnapshotItem($item);
203+
$entry = $item
204+
? ActivityEntry::singleton()->createFromSnapshotItem($item)
205+
: null;
202206

203207
return $entry?->Action;
204208
}

0 commit comments

Comments
 (0)