This lines invoke php notice about undefined array offset

      $vids = array_intersect(array_keys($node->taxonomy), $hs_vids);
      if (!empty($vids)) {
        $vid = $vids[0];
        $values['save-lineage-termpath'] = $values["save-lineage-termpath:$vid"];
        $values['save-lineage-termpath-raw'] = $values["save-lineage-termpath-raw:$vid"];
      }

That's because array_intersect save keys of array.
The result of
var_dump(array_intersect(array('a','b'), array('b')));
Will be

array(1) {
  [1]=>
  string(1) "b"
}

So in this case 0 - is undefined offset of resulting array.
If in this place needed just get first vid, i propose use array_shift().

CommentFileSizeAuthor
fix-php-notice.patch673 bytesIRuslan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stefan.r’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

6.x issue without activity for over 3 years, closing.

Please reopen if this is still an issue in 7.x.