From 8e9d557ac83179d0c97a1b518965946856f1eac2 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 27 Mar 2003 18:48:48 +0000 Subject: - Bugfix by Al. --- modules/poll.module | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'modules/poll.module') diff --git a/modules/poll.module b/modules/poll.module index 0061f219e..8538bf4a6 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -56,7 +56,7 @@ function poll_block($op = "list", $delta = 0) { poll_view($poll, 1, 1); } } - $block["subject"] = t("Latest poll: %t", array("%t" => $poll->title)); + $block["subject"] = t("Poll: %t", array("%t" => $poll->title)); $block["content"] = $poll->body; return $block; } @@ -239,9 +239,11 @@ function poll_system($field){ function poll_teaser($node) { // Create a simple teaser that lists all the choices - foreach ($node->choice as $k => $v) { - if ($v != "") { - $teaser .= "* $v\n"; + if (is_array($node->choice)) { + foreach ($node->choice as $k => $v) { + if ($v != "") { + $teaser .= "* $v\n"; + } } } return $teaser; -- cgit v1.2.3