Test for EndTime value before using strftime on it.

This commit is contained in:
Isaac Connor 2020-11-02 15:45:05 -05:00
parent 96a9a73320
commit bd1d4f954b
1 changed files with 1 additions and 1 deletions

View File

@ -213,7 +213,7 @@ function queryRequest($filter, $search, $advsearch, $sort, $offset, $order, $lim
$row['Emailed'] = $row['Emailed'] ? translate('Yes') : translate('No');
$row['Cause'] = validHtmlStr($row['Cause']);
$row['StartTime'] = strftime(STRF_FMT_DATETIME_SHORTER, strtotime($row['StartTime']));
$row['EndTime'] = strftime(STRF_FMT_DATETIME_SHORTER, strtotime($row['EndTime']));
$row['EndTime'] = $row['EndTime'] ? strftime(STRF_FMT_DATETIME_SHORTER, strtotime($row['EndTime'])) : null;
$row['Length'] = gmdate('H:i:s', $row['Length'] );
$row['Storage'] = ( $row['StorageId'] and isset($StorageById[$row['StorageId']]) ) ? $StorageById[$row['StorageId']]->Name() : 'Default';
$row['Notes'] = nl2br(htmlspecialchars($row['Notes']));