Download & Extend

Decisions module returns various PHP "Undefined property" notices

Project:Decisions
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:anarcat
Status:closed (fixed)

Issue Summary

When error reporting is set to E_ALL, the decisions module returns the following notices when editing a node.

# notice: Undefined property: stdClass::$uselist in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 96.
# notice: Undefined offset: 2 in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 104.
# notice: Undefined property: stdClass::$quorum_abs in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 122.
# notice: Undefined property: stdClass::$quorum_percent in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 122.
# notice: Undefined property: stdClass::$active in /var/www/drupal6.sites/all/modules/decisions/decisions_node.inc on line 232.
# notice: Undefined property: stdClass::$active in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 43.
# notice: Undefined property: stdClass::$uselist in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 96.
# notice: Undefined offset: 2 in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 104.
# notice: Undefined property: stdClass::$quorum_abs in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 122.
# notice: Undefined property: stdClass::$quorum_percent in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 122.
# notice: Undefined property: stdClass::$active in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 43.
# notice: Undefined property: stdClass::$algorithm in /var/www/drupal6.sites/all/modules/decisions/modes/ranking.module on line 303.
# notice: Undefined property: stdClass::$startdate in /var/www/drupal6.sites/all/modules/decisions/decisions.module on line 260.
# notice: Undefined property: stdClass::$runtime in /var/www/drupal6.sites/all/modules/decisions/decisions.module on line 261.
# notice: Undefined property: stdClass::$uselist in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 96.
# notice: Undefined offset: 2 in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 104.
# notice: Undefined property: stdClass::$uselist in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 96.
# notice: Undefined offset: 2 in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 104.
# notice: Undefined property: stdClass::$quorum_abs in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 122.
# notice: Undefined property: stdClass::$quorum_percent in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 122.
# notice: Undefined offset: 2 in /var/www/drupal6.sites/all/modules/decisions/decisions.inc on line 104.

The issue http://drupal.org/node/399952#comment-1434276 also reports such notices on lines 189, 190 and 196 of decisions_node.inc.

This problem shouldn't affect production sites unless E_NOTICE events are reported.

It would be nice to have this fixed and reviewed, though for the next stable release.

Comments

#1

Priority:minor» critical

#2

Priority:critical» minor

#3

Status:active» needs review

I think some of the notices in the original report have been fixed, but I was getting several on the node/add/decisions-selection page. Patch attached :)

AttachmentSize
decisions-undefined-423432.patch 2.23 KB

#4

Status:needs review» needs work

Actually, there are a bunch of other ones I just noticed after submitting decision nodes.

#5

Status:needs work» needs review

Found a few more. I feel like we can fix these as more come up.

AttachmentSize
decisions-undefined-423432.patch 3.89 KB

#6

Assigned to:Anonymous» anarcat

I can't review this today, I'll try to take a look next week, thanks!

#7

Status:needs review» fixed

Fix committed. Reopen if new ones are found (even without a patch).

#8

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here