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

这个提交包含在:
Andreas 2023-06-23 09:14:09 +02:00
父节点 0de4769739
当前提交 bfea8f0752

查看文件

@ -102,17 +102,19 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
<td> <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> <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 <?php
$lotw_hint = ''; if ($row->lastupload) {
$diff = (time() - strtotime($row->lastupload)) / 86400; $lotw_hint = '';
if ($diff > 365) { $diff = (time() - strtotime($row->lastupload)) / 86400;
$lotw_hint = ' lotw_info_red'; if ($diff > 365) {
} elseif ($diff > 30) { $lotw_hint = ' lotw_info_red';
$lotw_hint = ' lotw_info_orange'; } elseif ($diff > 30) {
} elseif ($diff > 7) { $lotw_hint = ' lotw_info_orange';
$lotw_hint = ' lotw_info_yellow'; } 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>'); ?> $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> </td>
<?php <?php