Fix test for 'geo' key

This commit is contained in:
Brian Huisman 2023-04-20 12:09:55 -04:00
parent 8768cae733
commit b4ef2827ae

View file

@ -2901,7 +2901,7 @@ document.write(mustache.render(
} ?>
<td class="text-end d-none d-md-table-cell" data-value="<?php echo $query['ipaddr']; ?>">
<a href="https://bgp.he.net/ip/<?php echo $query['ipaddr']; ?>" target="_blank"><?php echo $query['ipaddr']; ?></a><?php
if ($query['geo']) {
if (!empty($query['geo'])) {
if (file_exists(__DIR__.'/img/flags/'.strtolower($query['geo']->raw['country']['iso_code']).'.png')) { ?>
<img src="<?php echo
'img/flags/'.strtolower($query['geo']->raw['country']['iso_code']).'.png';