GenericTable: prevent passing NULL to strtotime

This commit is contained in:
Aaron van Geffen 2022-07-14 16:45:32 +02:00
parent c763967463
commit 3de87809bb

View File

@ -234,7 +234,9 @@ class GenericTable
else else
$pattern = $options['data']['pattern']; $pattern = $options['data']['pattern'];
if (!is_numeric($rowData[$options['data']['timestamp']])) if (!isset($rowData[$options['data']['timestamp']]))
$timestamp = 0;
elseif (!is_numeric($rowData[$options['data']['timestamp']]))
$timestamp = strtotime($rowData[$options['data']['timestamp']]); $timestamp = strtotime($rowData[$options['data']['timestamp']]);
else else
$timestamp = (int) $rowData[$options['data']['timestamp']]; $timestamp = (int) $rowData[$options['data']['timestamp']];