In the method views_handler_filter_term_node_tid::init, bitwise & is used where clearly && was intended:

if (isset($this->options['vid']) && !empty($this->options['vid']) & empty($this->options['vocabulary'])) {

In this case, the outcome would be the same regardless. But such mistakes should be corrected, because some adjustment to the if control structure, and this could cause a problem that is difficult to spot.

For example, suppose we change it to:

if ($this->options['vid'] & empty($this->options['vocabulary'])) {

Then half the time this works as expected.

CommentFileSizeAuthor
#2 bitwise_and-views-2503717-2.patch841 bytesMiroslavBanov
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MiroslavBanov’s picture

Issue summary: View changes
MiroslavBanov’s picture

Status: Active » Needs review
FileSize
841 bytes
Chris Matthews’s picture

The 4 year old patch in #2 to views_handler_filter_term_node_tid.inc applied cleanly to the latest views 7.x-3.x-dev and if still relevant needs to be reviewed.