diff --git a/system/functions.php b/system/functions.php index 8a6dc980..696c3d54 100644 --- a/system/functions.php +++ b/system/functions.php @@ -142,7 +142,7 @@ function getGuildLink($name, $generate = true) function getItemNameById($id) { require_once LIBS . 'items.php'; $item = Items::get($id); - return $item['name']; + return !empty($item['name']) ? $item['name'] : ''; } function getItemImage($id, $count = 1) diff --git a/system/libs/items.php b/system/libs/items.php index bc8f4716..af663c1b 100644 --- a/system/libs/items.php +++ b/system/libs/items.php @@ -74,7 +74,7 @@ class Items public static function get($id) { self::load(); - return self::$items[$id]; + return isset(self::$items[$id]) ? self::$items[$id] : []; } public static function getDescription($id, $count = 1) {