aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/lib/Check/RequestTime.php
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2022-11-14 19:33:16 +0100
committerGitHub <noreply@github.com>2022-11-14 19:33:16 +0100
commit6d8774a2320102e1f44324936d99a585b57401db (patch)
tree8e249bd45f8adde31ab3dd0b31fd3a85d5bc5eae /apps/workflowengine/lib/Check/RequestTime.php
parent6bd55b73ea68f736906855f76f4239493894b1d2 (diff)
parent9ba9f9a7dcd7654336fa714cbd178f6a2c1710a8 (diff)
downloadnextcloud-server-6d8774a2320102e1f44324936d99a585b57401db.tar.gz
nextcloud-server-6d8774a2320102e1f44324936d99a585b57401db.zip
Merge pull request #35157 from nextcloud/fix/avoid-passing-null-to-datetime-createfromformat
Make sure to not pass null to DateTime::createFromFormat
Diffstat (limited to 'apps/workflowengine/lib/Check/RequestTime.php')
-rw-r--r--apps/workflowengine/lib/Check/RequestTime.php4
1 files changed, 2 insertions, 2 deletions
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);
}