CyberDevil Posted June 13, 2018 Group: Members Topic Count: 40 Topics Per Day: 0.02 Content Count: 242 Reputation: 37 Joined: 02/25/18 Last Seen: December 2, 2024 Share Posted June 13, 2018 (edited) Hi, I have this error (debug: true) when a merchant sell refined potions: Quote Notice: Undefined variable: isMine in /var/www/html/themes/default/vending/viewshop.php on line 66 This is my viewshop.php (original file without modifications): <?php if (!defined('FLUX_ROOT')) exit; ?> <h2><?php echo htmlspecialchars($title); ?></h2> <?php if ($vending): ?> <h3 style="text-align:right; margin:0; padding:0;font-style: italic"><img style="position:relative;top:7px;" src="<?php echo $this->iconImage(671) ?>?nocache=<?php echo rand() ?>" /> <?php echo $vending->title ?> </h3> <h4 style="text-align:right; color:blue; margin:0; margin-bottom:15px; "> <?php echo $vending->map; ?>, <?php echo $vending->x; ?>, <?php echo $vending->y; ?> </h4> <?php if ($vending_items): ?> <table class="horizontal-table"> <thead> <tr> <th>ID</th> <th>Name</th> <th>Refine</th> <th>Slot</th> <th>Card0</th> <th>Card1</th> <th>Card2</th> <th>Card3</th> <th>Price</th> <th>Amount</th> </tr> </thead> <tbody> <?php foreach ($vending_items as $item): ?> <tr> <td width="50" align="right" style=""> <?php if ($auth->actionAllowed('item', 'view')): ?> <a href="<?php echo $this->url('item', 'view', array("id" => $item->nameid)); ?>"><?php echo $item->nameid; ?></a> <?php else: ?> <?php echo $item->nameid ?> <?php endif ?> </td> <td> <img src="<?php echo $this->iconImage($item->nameid) ?>?nocache=<?php echo rand() ?>" /> <?php if ($auth->actionAllowed('item', 'view')): ?> <a href="<?php echo $this->url('item', 'view', array("id" => $item->nameid)); ?>"><?php echo $item->item_name; ?></a> <?php else: ?> <?php echo $item->item_name ?> <?php endif ?> <?php if ($item->char_name): ?> Of <?php echo $item->char_name ?> <?php endif; ?> </td> <td> <?php if ($item->refine > 0): ?> <img src="<?php echo $this->iconImage(613) ?>?nocache=<?php echo rand() ?>" /> <strong><?php echo $item->refine ?></strong> <?php endif; ?> <?php if ($item->card0 == 255 && intval($item->card1 / 1280) > 0): ?> <?php for ($i = 0; $i < intval($item->card1 / 1280); $i++): ?> Very <?php endfor ?> Strong <?php endif ?> <?php if ($item->card0 == 254 || $item->card0 == 255): ?> <?php if ($item->char_name): ?> <?php if ($auth->actionAllowed('character', 'view') && ($isMine || (!$isMine && $auth->allowedToViewCharacter))): ?> <?php echo $this->linkToCharacter($item->char_id, $item->char_name, $session->serverName) . "'s" ?> <?php else: ?> <?php echo htmlspecialchars($item->char_name . "'s") ?> <?php endif ?> <?php else: ?> <span class="not-applicable"><?php echo htmlspecialchars(Flux::message('UnknownLabel')) ?></span>'s <?php endif ?> <?php endif ?> <?php if ($item->card0 == 255 && array_key_exists($item->card1 % 1280, $itemAttributes)): ?> <?php echo htmlspecialchars($itemAttributes[$item->card1 % 1280]) ?> <?php endif ?> </td> <td> <?php if ($item->slots): ?> <?php echo htmlspecialchars(' [' . $item->slots . ']') ?> <?php endif ?> </td> <td> <?php if ($item->card0 && ($item->type == 4 || $item->type == 5) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?> <?php if (!empty($cards[$item->card0])): ?> <?php echo $this->linkToItem($item->card0, $cards[$item->card0]) ?> <?php else: ?> <?php echo $this->linkToItem($item->card0, $item->card0) ?> <?php endif ?> <?php else: ?> <span class="not-applicable">None</span> <?php endif ?> </td> <td> <?php if ($item->card1 && ($item->type == 4 || $item->type == 5) && $item->card0 != 255 && $item->card0 != -256): ?> <?php if (!empty($cards[$item->card1])): ?> <?php echo $this->linkToItem($item->card1, $cards[$item->card1]) ?> <?php else: ?> <?php echo $this->linkToItem($item->card1, $item->card1) ?> <?php endif ?> <?php else: ?> <span class="not-applicable">None</span> <?php endif ?> </td> <td> <?php if ($item->card2 && ($item->type == 4 || $item->type == 5) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?> <?php if (!empty($cards[$item->card2])): ?> <?php echo $this->linkToItem($item->card2, $cards[$item->card2]) ?> <?php else: ?> <?php echo $this->linkToItem($item->card2, $item->card2) ?> <?php endif ?> <?php else: ?> <span class="not-applicable">None</span> <?php endif ?> </td> <td> <?php if ($item->card3 && ($item->type == 4 || $item->type == 5) && $item->card0 != 254 && $item->card0 != 255 && $item->card0 != -256): ?> <?php if (!empty($cards[$item->card3])): ?> <?php echo $this->linkToItem($item->card3, $cards[$item->card3]) ?> <?php else: ?> <?php echo $this->linkToItem($item->card3, $item->card3) ?> <?php endif ?> <?php else: ?> <span class="not-applicable">None</span> <?php endif ?> </td> <td style="color:goldenrod; text-shadow:1px 1px 0px brown;"> <?php echo number_format($item->price, 0, ',', ' '); ?> z </td> <td> <?php echo $item->amount ?> </td> </tr> <?php endforeach ?> </tbody> </table> <?php else: ?> <p>No Items found. <a href="javascript:history.go(-1)">Go back</a>.</p> <?php endif ?> <?php else: ?> <p>No Vendor found. <a href="javascript:history.go(-1)">Go back</a>.</p> <?php endif ?> and specifically, the line 66 is this: <?php if ($auth->actionAllowed('character', 'view') && ($isMine || (!$isMine && $auth->allowedToViewCharacter))): ?> Can you advise me how to fix this bug? Edited June 13, 2018 by CyberDevil Link to comment Share on other sites More sharing options...
0 Aries Posted June 13, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 70 Reputation: 18 Joined: 01/28/12 Last Seen: May 10, 2021 Share Posted June 13, 2018 If you want to manually fix the issue pls refer to this commit https://github.com/rathena/FluxCP/pull/184/files 1 Link to comment Share on other sites More sharing options...
0 CyberDevil Posted June 14, 2018 Group: Members Topic Count: 40 Topics Per Day: 0.02 Content Count: 242 Reputation: 37 Joined: 02/25/18 Last Seen: December 2, 2024 Author Share Posted June 14, 2018 thank you @Aries, you have my highest esteem! Link to comment Share on other sites More sharing options...
Question
CyberDevil
Hi, I have this error (debug: true) when a merchant sell refined potions:
This is my viewshop.php (original file without modifications):
and specifically, the line 66 is this:
Can you advise me how to fix this bug?
Edited by CyberDevilLink to comment
Share on other sites
2 answers to this question
Recommended Posts