bug in voting_actions.inc

miller-drupal@d... - November 6, 2007 - 23:07
Project:Voting Actions
Version:5.x-2.0b2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

function _voting_actions_compare($left, $op, $right, $default = TRUE) {
if (empty($left) || empty($default)) {
return $default;
}

must be replaced with

function _voting_actions_compare($left, $op, $right, $default = FALSE) {
if (!isset($left) || !isset($right)) {
return $default;
}

in case of condition, for example, $node->promote == 1
current code will always return true

#1

FatPitchFinancials - December 19, 2007 - 15:00

Thank you for this bug fix. It worked nicely to solve a problem I was having when the first vote for a node was +1 and the second was -1, the node would get unpublished even though I set the voting action to unpublish when the node point was < -1.

 
 

Drupal is a registered trademark of Dries Buytaert.