Index: fivestar.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/fivestar/fivestar.module,v retrieving revision 1.2.2.110 diff -u -r1.2.2.110 fivestar.module --- fivestar.module 10 Apr 2009 19:45:02 -0000 1.2.2.110 +++ fivestar.module 11 Apr 2009 05:06:18 -0000 @@ -688,12 +688,12 @@ * Internal function to handle vote casting, flood control, XSS, IP based * voting, etc... */ -function _fivestar_cast_vote($type, $cid, $value, $tag = NULL, $uid = NULL) { +function _fivestar_cast_vote($type, $cid, $value, $tag = NULL, $uid = NULL, $skip_validation = FALSE) { global $user; $tag = empty($tag) ? 'vote' : $tag; // Bail out if the user's trying to vote on an invalid object. - if (!fivestar_validate_target($type, $cid, $uid)) { + if (!$skip_validation && !fivestar_validate_target($type, $cid, $uid)) { return array(); } @@ -966,9 +966,9 @@ } $values = array( - 'average' => $current_avg->value, - 'user' => $user_vote->value, - 'count' => $current_count->value, + 'average' => (int)$current_avg->value, + 'user' => (int)$user_vote->value, + 'count' => (int)$current_count->value, ); $settings = array( @@ -1607,8 +1607,8 @@ $values = array( 'average' => (int)$value, - 'user' => $user_vote->value, - 'count' => $current_count->value, + 'user' => (int)$user_vote->value, + 'count' => (int)$current_count->value, ); $settings = array(