plugin selects require a note

Bug #548867 reported by EdB
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Quam Plures
Fix Released
Medium
Tilman Blumenbach

Bug Description

Noticed that a plugin that has a 'select' type field throws an error on the plugin's settings page if it does not have a value for 'note'. Message thrown is "Notice: Undefined index: note in D:\wamp\www\more_plugin_stuff\inc\plugins\_plugin.funcs.php on line 247". Code in that area is:

case 'select':
 $params['force_keys_as_values'] = true; // so that numeric keys get used as values! autoform_validate_param_value() checks for the keys only.
 $Form->select_input_array( $input_name, $set_value, $parmeta['options'], $set_label, $parmeta['note'], $params );
 break;

No idea how to fix it. Can easily add an empty note field but that seems hackish.

Related branches

Revision history for this message
Tilman Blumenbach (tblue) wrote :

I tried to fix this bug (see linked branch). Could you please confirm that the notice is not shown anymore when no note is provided? Please also test whether it still works with a note specified.

Changed in quam-plures:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Tilman Blumenbach (tblue)
milestone: none → 0.0.0
Revision history for this message
EdB (edb) wrote :

Solution Confirmated :) Tested with the same plugin that generated the notice. A select without a note does not throw a notice. A select with an empty note does not throw a notice. A select with a note with actual content does not throw a notice.

Push the branch through to merge and I'll get it done ASAP but I do have a VERY long day in front of me.

Thanks!

Changed in quam-plures:
status: In Progress → Fix Committed
EdB (edb)
Changed in quam-plures:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.