Fix dereferencing $tag when null

This commit is contained in:
Aaron van Geffen 2024-01-14 16:15:23 +01:00
parent 374fa5cccd
commit 44ca9ed1a5

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,
]); ]);