From fc1792c31cd4f3df4b7ad83b139672e147d233b4 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 8 Jan 2022 17:39:30 +0100 Subject: [PATCH] Treat invalid timestamps as a missing date --- wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php b/wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php index 74a632e697..cba609b822 100644 --- a/wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php @@ -372,12 +372,9 @@ class ArticleAddForm extends AbstractForm } // article date - if (empty($this->time)) { + if (empty($this->time) || !$this->timeObj) { throw new UserInputException('time'); } - if (!$this->timeObj) { - throw new UserInputException('time', 'invalid'); - } // publication status if ($this->publicationStatus != Article::UNPUBLISHED && $this->publicationStatus != Article::PUBLISHED && $this->publicationStatus != Article::DELAYED_PUBLICATION) { -- 2.20.1