Ещё больше Undefined index fix

This commit is contained in:
Igor Barkov [iwork] 2018-12-11 15:48:17 +02:00
parent 4524183fd2
commit 4a2c246203

View File

@ -1642,20 +1642,24 @@ function showitem($row, $type, $returned = false, $infOnly = false)
global $user; global $user;
$runes_exp = ['1' => 10500, '2' => 23500, '3' => 38500, '4' => 57000, '5' => 77000, '6' => 103000, '7' => 136500, '8' => 171500, '9' => 212500, '10' => 257500]; $runes_exp = ['1' => 10500, '2' => 23500, '3' => 38500, '4' => 57000, '5' => 77000, '6' => 103000, '7' => 136500, '8' => 171500, '9' => 212500, '10' => 257500];
$returnHTML = ''; $returnHTML = '';
$magic = []; $magic['chanse'] = 0;
$incmagic = []; $magic['time'] = 0;
$magic['targeted'] = 0;
$up = ''; $up = '';
if ((($row['maxdur'] <= ($row['duration'])) || ($row['dategoden'] && $row['dategoden'] <= time()))) { if ((($row['maxdur'] <= ($row['duration'])) || ($row['dategoden'] && $row['dategoden'] <= time()))) {
destructitem($row['id']); destructitem($row['id']);
} }
if (!empty($row['includemagic'])) $incmagic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['includemagic'])->fetch_assoc();
if (!empty($row['magic'])) $magic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['magic'])->fetch_assoc(); if (!empty($row['magic'])) $magic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['magic'])->fetch_assoc();
else { else {
$magic['chanse'] = $incmagic['chanse']; $magic['chanse'] = $incmagic['chanse'];
$magic['time'] = $incmagic['time']; $magic['time'] = $incmagic['time'];
$magic['targeted'] = $incmagic['targeted']; $magic['targeted'] = $incmagic['targeted'];
} }
if (!empty($row['includemagic'])) $incmagic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['includemagic'])->fetch_assoc();
$incmagic['name'] = $row['includemagicname']; $incmagic['name'] = $row['includemagicname'];
$incmagic['cur'] = $row['includemagicdex']; $incmagic['cur'] = $row['includemagicdex'];
$incmagic['max'] = $row['includemagicmax']; $incmagic['max'] = $row['includemagicmax'];