Fixed errors in Marketplace

Solved `undefined index[...]` and `invalid argument supplied[...]`
errors in Marketplace.
This commit is contained in:
Kuzirashi 2014-04-18 23:22:12 +02:00
parent db24b1bdfb
commit fb86861447

View File

@ -3,7 +3,7 @@
$server = $config['shop']['imageServer']; $server = $config['shop']['imageServer'];
$imageType = $config['shop']['imageType']; $imageType = $config['shop']['imageType'];
$compare = getValue($_GET['compare']); $compare = getValue(@$_GET['compare']);
// If you are not comparing any items, present the list. // If you are not comparing any items, present the list.
if (!$compare) { if (!$compare) {
@ -33,7 +33,7 @@ if (!$compare) {
<td>Compare</td> <td>Compare</td>
</tr> </tr>
<?php <?php
foreach ($offers['wts'] as $o) { foreach (($offers['wts'] ? $offers['wts'] : array()) as $o) {
?> ?>
<tr> <tr>
<td><img src="<?php echo "http://".$server."/".$o['item_id'].".".$imageType; ?>" alt="Item Image"></td> <td><img src="<?php echo "http://".$server."/".$o['item_id'].".".$imageType; ?>" alt="Item Image"></td>
@ -58,7 +58,7 @@ if (!$compare) {
<td>Compare</td> <td>Compare</td>
</tr> </tr>
<?php <?php
foreach ($offers['wtb'] as $o) { foreach (($offers['wtb'] ? $offers['wtb'] : array()) as $o) {
?> ?>
<tr> <tr>
<td><img src="<?php echo "http://".$server."/".$o['item_id'].".".$imageType; ?>" alt="Item Image"></td> <td><img src="<?php echo "http://".$server."/".$o['item_id'].".".$imageType; ?>" alt="Item Image"></td>