Closed (fixed)
Project:
Voting API
Version:
master
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2005 at 16:40 UTC
Updated:
13 Dec 2005 at 17:20 UTC
Sorry it's not a patch, quick fix though. Remove two '$' from infront of object attribute names in the function votingapi_get_votes.
Spot the difference :-)
Old code:
while ($vobj = db_fetch_object($result)) {
// Give other modules a chance to alter the vote object, add additional data, etc..
votingapi_invoke_votingapi($vobj, 'load');
$votes->tags[$vote_data->tag][$vobj->$voting_id] = $vobj;
$votes->raw_votes[$vobj->$voting_id] = $vobj;
}
New code:
while ($vobj = db_fetch_object($result)) {
// Give other modules a chance to alter the vote object, add additional data, etc..
votingapi_invoke_votingapi($vobj, 'load');
$votes->tags[$vote_data->tag][$vobj->voting_id] = $vobj;
$votes->raw_votes[$vobj->voting_id] = $vobj;
}
Hint: $vobj->$voting_id
Comments
Comment #1
eaton commentedThanks for catching this, there was a last quick round of changes at 1am or so, and that one slipped through. Checking in the fixed version now!
Comment #2
eaton commentedPatch uploaded. Work still needs to be done to determine the best structure for the raw voting data.
Comment #3
(not verified) commented