diff options
-rw-r--r-- | modules/poll.module | 2 | ||||
-rw-r--r-- | modules/poll/poll.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/poll.module b/modules/poll.module index 07786b295..a9a057478 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -369,7 +369,7 @@ function poll_update($node) { db_query("UPDATE {poll} SET runtime = %d, active = %d WHERE nid = %d", $node->runtime, $node->active, $node->nid); db_query("DELETE FROM {poll_choices} WHERE nid = %d", $node->nid); - for ($i = 0; $i < $node->choices; $i++) { + for ($i = 0; $i < count($node->choice); $i++) { $choice->chtext = $node->choice[$i]; $choice->chvotes = (int)$node->chvotes[$i]; $choice->chorder = $i; diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 07786b295..a9a057478 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -369,7 +369,7 @@ function poll_update($node) { db_query("UPDATE {poll} SET runtime = %d, active = %d WHERE nid = %d", $node->runtime, $node->active, $node->nid); db_query("DELETE FROM {poll_choices} WHERE nid = %d", $node->nid); - for ($i = 0; $i < $node->choices; $i++) { + for ($i = 0; $i < count($node->choice); $i++) { $choice->chtext = $node->choice[$i]; $choice->chvotes = (int)$node->chvotes[$i]; $choice->chorder = $i; |