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