malformed expiration date should not cause poll deletion
This commit is contained in:
parent
eb798a3c4c
commit
f948750a77
1 changed files with 3 additions and 2 deletions
|
@ -86,8 +86,9 @@ class datahandler {
|
||||||
|
|
||||||
// check expiration date
|
// check expiration date
|
||||||
if (
|
if (
|
||||||
!empty($poll_data->poll->expirationDate) &&
|
!empty($poll_data->poll->expirationDate) &&
|
||||||
DateTime::createFromFormat('Y-m-d\TH:i:s.uO', $poll_data->poll->expirationDate) < new DateTime()
|
( $expirationDate = DateTime::createFromFormat('Y-m-d\TH:i:s.uO', $poll_data->poll->expirationDate) ) &&
|
||||||
|
$expirationDate < new DateTime()
|
||||||
) {
|
) {
|
||||||
$this->deletePoll($poll_id);
|
$this->deletePoll($poll_id);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue