patch from master - long player ip caused error

This commit is contained in:
slawkens 2023-02-17 17:17:19 +01:00
parent 5487314230
commit 937af536b6

View File

@ -663,7 +663,14 @@ else if (isset($_REQUEST['search'])) {
</div> </div>
<div class="col-12 col-sm-12 col-lg-6"> <div class="col-12 col-sm-12 col-lg-6">
<label for="lastip" class="control-label">Last IP:</label> <label for="lastip" class="control-label">Last IP:</label>
<input type="text" class="form-control" id="lastip" name="lastip" autocomplete="off" maxlength="10" value="<?php echo longToIp($player->getLastIP()); ?>" readonly/> <input type="text" class="form-control" id="lastip" name="lastip" autocomplete="off" maxlength="10" value="<?php
if (strlen($player->getLastIP()) > 11) {
echo inet_ntop($player->getLastIP());
}
else {
echo longToIp($player->getLastIP());
}
?>" readonly/>
</div> </div>
</div> </div>
<?php if ($db->hasColumn('players', 'loss_experience')): ?> <?php if ($db->hasColumn('players', 'loss_experience')): ?>