fixed error message when saving an article without date
authorMarcel Werk <burntime@woltlab.com>
Wed, 23 May 2018 18:55:05 +0000 (20:55 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 23 May 2018 18:55:05 +0000 (20:55 +0200)
wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php

index 997b1fb0917c1f84a75c8f3f92d36acb321fdb6b..461e052c1fc146afbbc040b9ebd3547e8a6dc7bb 100644 (file)
@@ -254,7 +254,7 @@ class ArticleAddForm extends AbstractForm {
                        $this->readImages();
                }
                
-               if ($this->publicationStatus === Article::PUBLISHED && $this->timeObj->getTimestamp() == $_POST['timeNowReference']) {
+               if ($this->publicationStatus === Article::PUBLISHED && $this->timeObj && $this->timeObj->getTimestamp() == $_POST['timeNowReference']) {
                        // supplied timestamp matches the time at which the form was initially requested,
                        // use the current time instead as publication timestamp, otherwise the article
                        // would be published in the past rather than "now"