warning: implode() [function.implode]: Invalid arguments passed in /Applications/MAMP/htdocs/drupal6/sites/all/modules/custom_formatters/custom_formatters.admin.inc on line 68.

The code in question is:

  $form['field_types'] = array(
    '#type' => 'textfield',
    '#title' => t('Field types'),
    '#autocomplete_path'  => 'js/formatters/autocomplete',
    '#default_value' => implode(', ', unserialize($formatter['field_types'])),
    '#description' => t('A comma-separated list of CCK fields. Example: number_integer, number_decimal.'),
    '#required' => TRUE,
  );

Looks like $formatter is an empty array at the time.

Comments

deciphered’s picture

Title: Error when creating NEW formatter » Warning when creating NEW formatter

Hi lyricnz,

Right you are, unfortunately the dev environment I've been testing on isn't showing warnings, but I will deal with that.
As it's only a warning it can be ignored, but it will be fixed, version 1.1 is practically ready to go, I just want to port it to 7 before I release it.

Cheers,
Deciphered.

deciphered’s picture

Status: Active » Fixed

Fixed in 6.x-1.1 and 7.x-1.x-dev.

Cheers,
Deciphered.

deciphered’s picture

Status: Fixed » Closed (fixed)
alan d.’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Priority: Normal » Minor
Status: Closed (fixed) » Active

Similar error in new dev snapshot. No 2 & 3 arguments (2 separate errors).

Missing argument 2 for _custom_formatters_tokens_list(), called in \sites\all\modules\custom_formatters\custom_formatters.module on line 319 and defined in \sites\all\modules\custom_formatters\custom_formatters.module on line 331.
deciphered’s picture

Hi Alan,

Good catch, can't believe I let that one slip through. Will be fixed in next development build.

Cheers,
Deciphered.

deciphered’s picture

Status: Active » Fixed

Fixed and committed to DRUPAL-6--1.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.