mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fix more PHP warnings and notices
This commit is contained in:
parent
f8ef1b3b61
commit
8c680608ff
@ -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)
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user