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

eaton’s picture

Thanks 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!

eaton’s picture

Status: Active » Fixed

Patch uploaded. Work still needs to be done to determine the best structure for the raw voting data.

Anonymous’s picture

Status: Fixed » Closed (fixed)