summaryrefslogtreecommitdiff
path: root/modules/poll/poll.module
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-07-13 21:49:41 -0400
committerwebchick <webchick@24967.no-reply.drupal.org>2011-07-13 21:49:41 -0400
commitc69b525c382bd24d389e56af3033d5a82051aab1 (patch)
tree27e524eb45f316d2a84203a14fb5cf483506f3d5 /modules/poll/poll.module
parentf2d2cf8a85df17c6c3bef236a8db147739529259 (diff)
downloadbrdo-c69b525c382bd24d389e56af3033d5a82051aab1.tar.gz
brdo-c69b525c382bd24d389e56af3033d5a82051aab1.tar.bz2
Issue #348448 follow-up by jrchamp, catch: Fix E_STRICT errors.
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r--modules/poll/poll.module4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index f45b8bda7..561e160c4 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -485,6 +485,10 @@ function poll_load($nodes) {
foreach ($nodes as $node) {
$poll = db_query("SELECT runtime, active FROM {poll} WHERE nid = :nid", array(':nid' => $node->nid))->fetchObject();
+ if (empty($poll)) {
+ $poll = new stdClass;
+ }
+
// Load the appropriate choices into the $poll object.
$poll->choice = db_select('poll_choice', 'c')
->addTag('translatable')