When trying to configure blocks for forward, i get some php warnings.
* warning: Cannot use a scalar value as an array in C:\..\drupal\includes\form.inc on line 1146.
* warning: Cannot use a scalar value as an array in C:\..\drupal\includes\form.inc on line 1146.
* warning: Cannot use a scalar value as an array in C:\..\drupal\includes\form.inc on line 1146.
* warning: Cannot use a scalar value as an array in C:\..\drupal\includes\form.inc on line 1146.
* warning: Invalid argument supplied for foreach() in C:\..\drupal\modules\block.module on line 371.
I traced back the warnings to forward_block and case configure.
If I replaced this code
$form['forward_block_type'] = array(
'#type' => 'radios',
'#title' => t('Block Type'),
'#default_value' => variable_get('forward_block_type', " "),
'#options' => $block_options,
'#description' => t('Choose the block type'),
'#required' => NULL,
'#attributes' => TRUE,
);
$output = drupal_get_form('forward_block', $form);
return $output;
With this code.. omitting the drupal_get_form and not sending #attributes
$form['forward_block_type'] = array(
'#type' => 'radios',
'#title' => t('Block Type'),
'#default_value' => variable_get('forward_block_type', " "),
'#options' => $block_options,
'#description' => t('Choose the block type'),
);
return $form;
Everything seems to work fine.
Dunno whether this is a bug or a bad installation on my part...
Any ideas?
- p
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | forward.module.patch | 884 bytes | advosuzi |
Comments
Comment #1
advosuzi commentedThis is a bug.
My first patch, thanks to crunchywelch's fix.
(hoping I got this right)
Comment #2
seanrIssue queue cleanup