Fix dereferencing $tag when null #47

Merged
minnozz merged 1 commits from fix-null-tag into master 2024-01-14 16:19:41 +01:00
Showing only changes of commit 44ca9ed1a5 - Show all commits

View File

@ -715,7 +715,7 @@ class Asset
LIMIT 1', LIMIT 1',
[ [
'id_asset' => $this->id_asset, 'id_asset' => $this->id_asset,
'id_tag' => $tag->id_tag, 'id_tag' => isset($tag) ? $tag->id_tag : null,
'date_captured' => $this->date_captured, 'date_captured' => $this->date_captured,
]); ]);
@ -746,7 +746,7 @@ class Asset
LIMIT 1', LIMIT 1',
[ [
'id_asset' => $this->id_asset, 'id_asset' => $this->id_asset,
'id_tag' => $tag->id_tag, 'id_tag' => isset($tag) ? $tag->id_tag : null,
'date_captured' => $this->date_captured, 'date_captured' => $this->date_captured,
]); ]);