Posted by miller-drupal@d... on November 6, 2007 at 11:07pm
Jump to:
| Project: | Voting Actions |
| Version: | 5.x-2.0b2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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
Comments
#1
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.