mirror of
				https://gitlab.com/hashborgir/d2tools.git
				synced 2025-10-31 09:03:40 -05:00 
			
		
		
		
	More item gen bug fixes with array merges and filters
This commit is contained in:
		| @@ -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'] = $baseItemInfo; | ||||||
|  | 		 | ||||||
|  | 		if(!empty($baseItemInfo)){ | ||||||
| 			$return['baseItemInfo'] = array_filter($baseItemInfo); | 			$return['baseItemInfo'] = array_filter($baseItemInfo); | ||||||
|  | 		} | ||||||
|  |  | ||||||
| 		if(!$doc){ | 		if(!$doc){ | ||||||
| 			header('Content-Type: application/json'); | 			header('Content-Type: application/json'); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user