From 9ba9f9a7dcd7654336fa714cbd178f6a2c1710a8 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 14 Nov 2022 16:23:50 +0100 Subject: Make sure to not pass null to DateTime::createFromFormat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/workflowengine/lib/Check/RequestTime.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/workflowengine/lib/Check') diff --git a/apps/workflowengine/lib/Check/RequestTime.php b/apps/workflowengine/lib/Check/RequestTime.php index b7a2f725451..be28f8ead15 100644 --- a/apps/workflowengine/lib/Check/RequestTime.php +++ b/apps/workflowengine/lib/Check/RequestTime.php @@ -109,12 +109,12 @@ class RequestTime implements ICheck { } $values = json_decode($value, true); - $time1 = \DateTime::createFromFormat('H:i e', $values[0]); + $time1 = \DateTime::createFromFormat('H:i e', (string)$values[0]); if ($time1 === false) { throw new \UnexpectedValueException($this->l->t('The given start time is invalid'), 3); } - $time2 = \DateTime::createFromFormat('H:i e', $values[1]); + $time2 = \DateTime::createFromFormat('H:i e', (string)$values[1]); if ($time2 === false) { throw new \UnexpectedValueException($this->l->t('The given end time is invalid'), 4); } -- cgit v1.2.3