From 187a7cd02f7977ee78c6ac5f19051e3492a88e34 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Thu, 14 Jul 2022 16:45:32 +0200 Subject: [PATCH] GenericTable: prevent passing NULL to strtotime --- models/GenericTable.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/models/GenericTable.php b/models/GenericTable.php index 0da224c9..0ead3689 100644 --- a/models/GenericTable.php +++ b/models/GenericTable.php @@ -234,7 +234,9 @@ class GenericTable else $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']]); else $timestamp = (int) $rowData[$options['data']['timestamp']];