From 2ad7cbec82149cbc385524da7c4d6c8807650b23 Mon Sep 17 00:00:00 2001 From: "Igor Barkov (iwork)" Date: Wed, 22 Jul 2020 12:55:27 +0300 Subject: [PATCH] Notice: Undefined index: present --- classes/InventoryItem.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/InventoryItem.php b/classes/InventoryItem.php index 80f80da..a821fa5 100644 --- a/classes/InventoryItem.php +++ b/classes/InventoryItem.php @@ -7,7 +7,9 @@ class InventoryItem extends Item public function __construct($row) { parent::__construct($row); - $this->present = $row['present']; + if (isset($row['present'])) { + $this->present = $row['present']; + } } public function printInfo()