After enabling poll im getting this error twice on every page load:

Notice: Undefined property: stdClass::$active in poll_load() (Zeile 499 von /var/www/SOMEPATH/httpdocs/drupal-7.0/modules/poll/poll.module).
CommentFileSizeAuthor
#1 poll.patch668 bytesdroplet

Comments

droplet’s picture

Status: Active » Needs review
StatusFileSize
new668 bytes
droplet’s picture

Version: 7.0 » 7.x-dev
R2-D8’s picture

Version: 7.x-dev » 7.0

Much better now, thanks.
But it's definitly affecting 7.0 also; so i switched back.

droplet’s picture

Version: 7.0 » 7.x-dev

@R2-D8

according to Drupal policy, it should always testing with latest Dev. Ver

bfroehle’s picture

Status: Needs review » Needs work

In my reading of the code, $poll->active should always be set. In any case, $poll->active is either 0 or 1 and so isset will return TRUE. So the patch suggested in #1 is definitely NOT what we want as it will allow people to vote on closed polls. (I've manually confirmed this).

Can you help me reproduce this error, preferably from a clean install of D7?

I've done a fresh install of D7, enabled the poll module, and created an active poll. I cannot get the error to appear.

(I can get the error by manually corrupting the {poll} table of the database).

R2-D8’s picture

@droplet
Didn't know that - thank's again.

@bfroehle
Ok that's a point. I upgraded from 7.x-dev (2011-01-04) to 7.0
So I tried to firgure out if there are differences between those poll versions that would explain any table errors but i cannot find anything.
Sure - I'll have to try a fresh installation; but it seems weird for now.

R2-D8’s picture

Status: Needs work » Closed (cannot reproduce)

A fresh 7.0 installation did it.
I'm sorry I don't know how I produced this error before;
I'd say this can be closed.

jomjom’s picture

Tnx man

plazik’s picture

I upgrade Drupal from 6 to 7 ang got this error after running cron. Drupal version is 7.16.
Patch #1 works for me. Why haven't it commited yet?