Fixed the previous fix about end_date bug in case of too far date.

This commit is contained in:
Clermonté 2018-08-13 14:56:34 +02:00 committed by Liquidsoul
parent 38552da738
commit 2e87e1f761
No known key found for this signature in database
GPG Key ID: 15983D72D696931D

View File

@ -37,13 +37,9 @@ class AdminPollService {
$end_date = strtotime($poll->end_date);
if ($end_date < strtotime($poll->creation_date)) {
$poll->end_date = $poll->creation_date;
} elseif ($end_date > $this->pollService->maxExpiryDate()) {
$poll->end_date = $this->pollService->maxExpiryDate();
$poll->end_date = utf8_encode(strftime('%Y-%m-%d', $this->pollService->maxExpiryDate()));
}
return $this->pollRepository->update($poll);