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

CommentFileSizeAuthor
#1 forward.module.patch884 bytesadvosuzi

Comments

advosuzi’s picture

Status: Active » Needs review
StatusFileSize
new884 bytes

This is a bug.
My first patch, thanks to crunchywelch's fix.
(hoping I got this right)

seanr’s picture

Status: Needs review » Closed (fixed)

Issue queue cleanup