I just confirmed and this is indeed the case. I reconfigured the string, using phpMyAdmin, in the core_polls table to the following for this poll:
{"1":{"question":"Choose ","multi":0,"choice":{"1":"Yes","2":"No"},"votes":{"1":0,"2":1}}}
And it worked successfully and tallied the votes correctly.
However, when the core_polls table field is set to this...
{"1":{"question":"Please place your vote.","multi":0,"choice":["Yes","No"],"votes":[0,1]}}
it does not work!
So, @Stuart Silvester's example, no longer works as of about February 2023.
When creating a poll via API, you cannot put this below (note the 'answers' array keys)...
/* poll variables below */
,'poll_title' => 'Cast your vote'
// poll_options: Array of objects with keys 'title' (string), 'answers' (array of objects with key 'value' set to the choice) and 'multichoice' (bool)
,'poll_options[1][title]' => urlencode('Make your choice, either Yes or No:')
,'poll_options[1][answers][0][value]' => 'Yes'
,'poll_options[1][answers][1][value]' => 'No'
,'poll_options[1][multichoice]' => '0'
,'poll_public' => '0' // bool Make the poll public
,'poll_only' => '0' // bool Make this a poll-only topic
You must put this below (again, note the 'answers' array keys)...
/* poll variables below */
,'poll_title' => 'Cast your vote'
// poll_options: Array of objects with keys 'title' (string), 'answers' (array of objects with key 'value' set to the choice) and 'multichoice' (bool)
,'poll_options[1][title]' => urlencode('Make your choice, either Yes or No:')
,'poll_options[1][answers][1][value]' => 'Yes'
,'poll_options[1][answers][2][value]' => 'No'
,'poll_options[1][multichoice]' => '0'
,'poll_public' => '0' // bool Make the poll public
,'poll_only' => '0' // bool Make this a poll-only topic
This appears to be a bug with the code as it worked before, and now it doesn't unless it is configured as I've shown. You cannot have the array key starting with poll_options[1][answers][0][value] because the '0' is submitted to the system and it doesn't know how to handle or count the the '0' as a legitimate value or response when someone votes.