This is a fresh install of drupal on the following system

Drupal 5.1
Configuration file Protected
Cron maintenance tasks Last run 2 hours 29 min ago
You can run cron manually.
Database schema Up to date
File system Writable (public download method)
GD library bundled (2.0.28 compatible)
MySQL database 5.0.27
PHP 5.1.6
Unicode library PHP Mbstring Extension
Web server Apache/1.3.37 (Unix) PHP/5.1.6 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a

I get the fatal error

Fatal error: Cannot unset string offsets in /home/user$/public_html/includes/form.inc on line 319

when i click the ad notifications link under settings....when i click back to the ads admin page this error is then listed at the top

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'ad_notify_settings_form' was given in /home/user$/public_html/includes/form.inc on line 218

Unfortunately i'm not sure of how to correct this....any thoughts would be appreciated.

Comments

jeremy’s picture

Which version of the module are you using? Are you really using the older 5.x-1.0 release? Why not the latest 5.x-1.0-1 release?

digitaldoctor’s picture

I'm sorry, It should be the 1.1 version...i downloaded it today

digitaldoctor’s picture

here is the code from around line 219

// If $callback was returned by a hook_forms() implementation, call it.
// Otherwise, call the function named after the form id.
$form = call_user_func_array(isset($callback) ? $callback : $form_id, $args); -----believe this is 219

// We store the original function arguments, rather than the final $arg
// value, so that form_alter functions can see what was originally
// passed to drupal_retrieve_form(). This allows the contents of #parameters
// to be saved and passed in at a later date to recreate the form.
$form['#parameters'] = $saved_args;
return $form;

and the code around 319

// Add a token, based on either #token or form_id, to any form displayed to
// authenticated users. This ensures that any submitted form was actually
// requested previously by the user and protects against cross site request
// forgeries.
if (isset($form['#token'])) {
if ($form['#token'] === FALSE || $user->uid == 0 || $form['#programmed']) {
unset($form['#token']);
}
else {
$form['form_token'] = array('#type' => 'token', '#default_value' => drupal_get_token($form['#token']));
}
}
else if ($user->uid && !$form['#programmed']) {
$form['#token'] = $form_id;
$form['form_token'] = array(
'#id' => form_clean_id('edit-'. $form_id .'-form-token'),
'#type' => 'token',
'#default_value' => drupal_get_token($form['#token']),
);
}

digitaldoctor’s picture

confirmed it is version = "5.x-1.0-1

jeremy’s picture

Component: ad.module » ad_notify.module
Assigned: digitaldoctor » jeremy
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)