Fixed reference and datetime format
authorAlexander Ebert <ebert@woltlab.com>
Sun, 5 Jun 2016 11:01:45 +0000 (13:01 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 5 Jun 2016 11:01:45 +0000 (13:01 +0200)
wcfsetup/install/files/lib/system/poll/PollManager.class.php

index 4b884a0c1c93ba69c845461249c707be76432f87..f6a13c537619fe6956d5b124a0b229645b99db45 100644 (file)
@@ -162,7 +162,7 @@ class PollManager extends SingletonFactory {
         */
        public function readFormParameters(array $postData = array()) {
                if (empty($postData)) {
-                       $postData &= $_POST;
+                       $postData =& $_POST;
                }
                
                // reset poll data and options prior to reading form input
@@ -170,7 +170,7 @@ class PollManager extends SingletonFactory {
                
                // poll data
                if (isset($postData['pollEndTime'])) {
-                       $d = \DateTime::createFromFormat('Y-m-d H:i', $postData['pollEndTime'], WCF::getUser()->getTimeZone());
+                       $d = \DateTime::createFromFormat('Y-m-d\TH:i:sP', $postData['pollEndTime'], WCF::getUser()->getTimeZone());
                        $this->pollData['endTime'] = ($d !== false) ? $d->getTimestamp() : 0;
                }