... because there is a leftover from after $page boolean was removed.

CommentFileSizeAuthor
poll-block_false.patch519 bytesAmrMostafa

Comments

stella’s picture

Status: Needs review » Reviewed & tested by the community

This is a simple patch and fixes a bug. The params to hook_view() have changed in D7, so the $page param is no longer used. Looks like this function got missed in the update. This patch just removes the extra $page argument.

Note: this API change isn't documented at Overview of Drupal API changes in 7.x, or at least I can't find it, but the api documentation on api.drupal.org confirms this api change in D7.

webchick’s picture

Status: Reviewed & tested by the community » Needs review

I don't suppose I can entice you to write tests for the poll block as part of this patch? There is a PollBlockTestCase in poll.test which claims to "Check if the most recent poll block is available." but it seems to do nothing of the sort; it's basically just moving the block to another region and checking for a confirmation message.

We can also handle this in a separate issue too, if you'd like, but since you're one of about... hm... 1 ;) people who are paying attention to poll module, I'd love to capture the bugs you've found so that we don't get them again. :)

stella’s picture

Status: Needs review » Closed (duplicate)

This is actually dependent on #372650: Poll node is not displayed when poll block is displayed as well in order to work properly (and vice versa i think). Since it's a one line change, I'm closing this one in favour of the other. Updated patch (with tests!) will follow on the other issue.