mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 04:26:03 +00:00
More item gen bug fixes with array merges and filters
This commit is contained in:
parent
10a2db46ad
commit
54ecb62674
@ -28,8 +28,15 @@ class D2ItemData {
|
|||||||
$x[] = $i;
|
$x[] = $i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!empty($x[0])){
|
||||||
$invClean = array_filter($x[0]);
|
$x[0] = array_filter($x[0]);
|
||||||
|
}
|
||||||
|
$invClean = $x[0];
|
||||||
|
if (!empty($invClean)){
|
||||||
|
$return = array_merge($res, $invClean);
|
||||||
|
} else {
|
||||||
|
$return = $res;
|
||||||
|
}
|
||||||
|
|
||||||
$return = array_merge($res, $invClean);
|
$return = array_merge($res, $invClean);
|
||||||
} else {
|
} else {
|
||||||
@ -140,7 +147,11 @@ class D2ItemData {
|
|||||||
$baseItemInfo = PDO_FetchRow($sqlWeapons);
|
$baseItemInfo = PDO_FetchRow($sqlWeapons);
|
||||||
}
|
}
|
||||||
|
|
||||||
$return['baseItemInfo'] = array_filter($baseItemInfo);
|
$return['baseItemInfo'] = $baseItemInfo;
|
||||||
|
|
||||||
|
if(!empty($baseItemInfo)){
|
||||||
|
$return['baseItemInfo'] = array_filter($baseItemInfo);
|
||||||
|
}
|
||||||
|
|
||||||
if(!$doc){
|
if(!$doc){
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
Loading…
Reference in New Issue
Block a user