Updated AdminPollService to correct bug on end_date

This commit is contained in:
Didier Clermonté 2018-08-13 12:19:06 +02:00 committed by root
parent c2eb45666a
commit 13c2543a7a
1 changed files with 1 additions and 5 deletions

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);