Fivestar comments saving wrong value for the first time

sign - June 21, 2009 - 15:05
Project:Fivestar
Version:6.x-1.15
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

How to replicate this:
Post a comment without any stars
Edit the comment and highlight it with 1 star
Click Save -> presents 5 stars

The problem is on the line 184 in fivestar_comment.module
db_query('INSERT INTO {fivestar_comment} (cid, value) VALUES (%d, %d)', $cid, $vote['user']['vote_id'], $value);
should be:
db_query('INSERT INTO {fivestar_comment} (cid, vote_id, value) VALUES (%d, %d, %d)', $cid, $vote['user']['vote_id'], $value);

patch attached

AttachmentSize
fivestar-comments.patch854 bytes

#1

quicksketch - June 30, 2009 - 22:47
Status:needs review» fixed

Committed to both 5 and 6 versions. Thanks!

#2

System Message - July 14, 2009 - 22:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.