function poll_teaser($node) {
  if (is_array($node->choice)) {
    foreach ($node->choice as $k => $choice) {
      $teaser .= '* '. $choice['chtext'] .'\n';
    }
  }
  return $teaser;
}

If $node is not an array, poll_teaser() tries to return the value of $teaser without $teaser ever having been defined.

CommentFileSizeAuthor
#1 _40630_poll.patch731 bytesMorbus Iff
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Morbus Iff’s picture

Assigned: Unassigned » Morbus Iff
Status: Active » Reviewed & tested by the community
FileSize
731 bytes
Dries’s picture

Committed to HEAD. Thanks.

Dries’s picture

Status: Reviewed & tested by the community » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)