[PHP8.1] Fixes passing null to parameter. Added if check Fixes #2223

pull/2224/head
Andreas 2023-06-23 09:14:09 +02:00
rodzic 0de4769739
commit bfea8f0752
1 zmienionych plików z 13 dodań i 11 usunięć

Wyświetl plik

@ -102,17 +102,19 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
<td>
<a id="edit_qso" href="javascript:displayQso(<?php echo $row->COL_PRIMARY_KEY; ?>)"><?php echo str_replace("0","&Oslash;",strtoupper($row->COL_CALL)); ?></a>
<?php
$lotw_hint = '';
$diff = (time() - strtotime($row->lastupload)) / 86400;
if ($diff > 365) {
$lotw_hint = ' lotw_info_red';
} elseif ($diff > 30) {
$lotw_hint = ' lotw_info_orange';
} elseif ($diff > 7) {
$lotw_hint = ' lotw_info_yellow';
}
?>
<?php $timestamp = strtotime($row->lastupload); echo ($row->callsign == '' ? '' : ' <small id="lotw_info" class="badge badge-success'.$lotw_hint.'" data-toggle="tooltip" data-original-title="LoTW User. Last upload was '.date($custom_date_format." H:i", $timestamp).'">L</small>'); ?>
if ($row->lastupload) {
$lotw_hint = '';
$diff = (time() - strtotime($row->lastupload)) / 86400;
if ($diff > 365) {
$lotw_hint = ' lotw_info_red';
} elseif ($diff > 30) {
$lotw_hint = ' lotw_info_orange';
} elseif ($diff > 7) {
$lotw_hint = ' lotw_info_yellow';
}
$timestamp = strtotime($row->lastupload); echo ($row->callsign == '' ? '' : ' <small id="lotw_info" class="badge badge-success'.$lotw_hint.'" data-toggle="tooltip" data-original-title="LoTW User. Last upload was '.date($custom_date_format." H:i", $timestamp).'">L</small>');
}
?>
</td>
<?php