From bd1d4f954bd39f18db67227430e5053943b46f7f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 2 Nov 2020 15:45:05 -0500 Subject: [PATCH] Test for EndTime value before using strftime on it. --- web/ajax/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/ajax/events.php b/web/ajax/events.php index 1f8e71f1a..fad91683d 100644 --- a/web/ajax/events.php +++ b/web/ajax/events.php @@ -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']));