The comments for the votingapi_set_votes function indicate that the content_id and fields are required and all other values are optional. I wrote a unit test that shows that the content_type is also a required field. (see the unit test patch at http://drupal.org/node/284010).

Obviously there is no current use in which the content_type is not being specified, so I recommend that we simply change the documentation to match the current behavior.

CommentFileSizeAuthor
votingapi_doc.patch1.1 KBpaul.lovvik

Comments

paul.lovvik’s picture

Status: Active » Needs review
eaton’s picture

Status: Needs review » Fixed

Actually... I changed it so that it assumes nodes if no type is passed in, to match the documentation. Thanks for the simpletests, by the way: they're now part of the votingapi package, and helped quite a bit in tracking down a couple of obscure problems!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.