Skip to content

Commit

Permalink
PHP: Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
mia-pi-git committed Jul 20, 2024
1 parent 8e10a46 commit ad86238
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion play.pokemonshowdown.com/ladder.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<td><?php echo '<em>'.round($row['rpr']).'<small> &#177; '.round($row['rprd']).'</small></em>'; /* if (floatval($row['rprd']) > 100) echo ' <small>(provisional)</small>'; */ ?></td>
<td>
<?php
if (in_array($coil_vals, $row['formatid'])) {
if (in_array($row['formatid'], $coil_vals)) {
echo number_format($N ? 40*$row['gxe']*pow(2.0,-$coil_vals[$row['formatid']]/$N) : 0,1,'.','');
} else echo '--';
?></td>
Expand Down
4 changes: 2 additions & 2 deletions pokemonshowdown.com/ladder.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
$toplist = $ladder->getTop();
$coil_vals = array();
try {
json_decode(file_get_contents('./config/coil.json'));
json_decode(file_get_contents('../config/coil.json'));
} catch (Exception $e) {}
$i=0;

Expand Down Expand Up @@ -231,7 +231,7 @@

<td>
<?php
if (in_array($coil_vals, $formatid)) {
if (in_array($formatid, $coil_vals)) {
echo number_format($N ? 40*$row['gxe']*pow(2.0,-$coil_vals[$formatid]/$N) : 0,1,'.','');
} else echo '--';
?></td>
Expand Down

0 comments on commit ad86238

Please sign in to comment.