return 1, where it should in Polls API

This commit is contained in:
NoPlagiarism 2022-12-16 00:53:27 +05:00
parent 2e327433a6
commit 314809978a

View file

@ -74,7 +74,7 @@ final class Polls extends VKAPIRequestHandler
try {
$poll->vote($this->getUser(), explode(",", $answers_ids));
return 0;
return 1;
} catch(AlreadyVotedException $ex) {
return 0;
} catch(PollLockedException $ex) {
@ -95,7 +95,7 @@ final class Polls extends VKAPIRequestHandler
try {
$poll->revokeVote($this->getUser());
return 0;
return 1;
} catch(PollLockedException $ex) {
$this->fail(15, "Access denied: Poll is locked or isn't revotable");
} catch(InvalidOptionException $ex) {