vmichnowicz/polls — Issue #5: Option id's not starting at 1 causes 404
Author: Pjanssen
Created: 2012-02-21 21:29:08+00:00
State: open

There seems to be an issue when you create and remove poll options, causing the id's to start at a number higher than 1. When trying to vote, a 404 page is shown.

I'm not sure whether all browsers are affected, but at least in Firefox this path is taken:
(line 155 in polls.php)
```php
// If this poll option is not a valid option for the current poll
if ( ! array_key_exists($option['id'], $poll_options) )
{
show_404();
}```

After having manually reset the id's to start at 1 in the database, voting works fine again.