Closed (fixed)
Project:
Select (or other)
Version:
6.x-2.7
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Jul 2011 at 08:50 UTC
Updated:
11 Aug 2011 at 12:12 UTC
Line 219 of select_or_other.module is:
if ($element['#select_or_other_checkboxes']) {
This generate a PHP-notice. Could it be changed to the following?
if (isset($element['#select_or_other_checkboxes'])) {
Comments
Comment #1
danielb commentedJust curious - are you using a development version of Drupal core?
These notices are suppressed in my Drupal 6 setup.
I think we'll need to test both isset() and keep the current evaluation of the variable.
Comment #2
danielb commentedComment #3
danielb commentedps wtf did this have to do with webform?
Comment #4
liam morlandThis can be configured in your php.ini. I don't think the version of Drupal core would effect this.
You could do this instead of two separate checks:
Comment #5
danielb commentedFrom what I've read it makes a difference whether you install an official drupal 6 release vs. a development release. The development release forces the notices to show to assist development. I think Drupal 7 always shows them no matter what.
That would still display the notice....
Comment #6
liam morlandIt does not display the notice. I just tried it and the PHP documentation says "no warning is generated when the variable is not set". Cheers.
Comment #7
danielb commentedReally? I've been complaining about this for ages. I'm sure I've been given bug reports to add an isset() before a !empty().
Well that's good to know, cheers, I'll try to do that from now on.
Comment #8
Jorrit commentedI use the devel module to disable the Drupal error handler. In that way, I do get notices about errors in my own developed modules. For me, this helps avoiding problems like mistyped variable names that go unspotted easily in PHP. However, for this approach to work all contrib modules I use need to be E_NOTICE proof as well. That's why I requested this small change. Thanks for implementing it!