Recent Topics

[plugin] configuration warning / undefined index

started by on Feb 05, 2011 – Last touched: Feb 05, 2011

Feb 05, 2011 12:56    

While installing and configuring the reCAPTCHA extension, b2evolution 3.3.1 threw the following warnings in the configuration tab for the plugin:

Notice: Undefined index: note in ..../b2evolution/inc/plugins/_plugin.funcs.php on line 248

Looking at the code, I made the following two replacements:

Code

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;

modified to:

Code

...
    $Form->select_input_array( $input_name, $set_value, $parmeta['options'], $set_label, $params['note'], $params );
...

Then, on line 90:

Code

if( isset($parmeta['note']) )
{
    $params['note'] = $parmeta['note'];
}

extended to:

Code

...
else
{
    $params['note'] = '';
}

Afterwards, the configuration did not throw any more warnings; there are apparently no undesirable side-effects so far.


Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.