I'm getting this error when I enable and disable the captcha module on sites/all/modules:

Fatal error: Cannot pass parameter 4 by reference in /path/to/drupal-6.19/modules/user/user.module on line 1978

I can reload and the module appears enabled but admin/user/captcha redirects me back to admin/user.

I tried enabling captcha with drush and I get the following:

WD php: array_fill(): Number of elements must be positive in [error]
/path/to/drupal-6.19/includes/database.inc on line
253.
WD php: implode(): Invalid arguments passed in [error]
/path/to/drupal-6.19/includes/database.inc on line
253.
WD php: array_keys(): The first argument should be an array in [error]
/path/to/drupal-6.19/modules/user/user.module on
line 513.
WD php: You have an error in your SQL syntax; check the manual that [error]
corresponds to your MySQL server version for the right syntax to use
near ')' at line 1
query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid =
r.rid WHERE r.rid IN () in
/path/to/drupal-6.19/modules/user/user.module on
line 513.
WD php: Invalid argument supplied for foreach() in [error]
/path/to/drupal-6.19/sites/all/modules/tac_lite/tac_lite.module
on line 428.
Could not login with user ID #0. [error]
array_fill(): Number of elements must be positive in [warning]
/path/to/drupal-6.19/includes/database.inc on line
253.
implode(): Invalid arguments passed in [warning]
/path/to/drupal-6.19/includes/database.inc on line
253.
array_keys(): The first argument should be an array in [warning]
/path/to/drupal-6.19/modules/user/user.module on
line 513.
You have an error in your SQL syntax; check the manual that [error]
corresponds to your MySQL server version for the right syntax to use
near ')' at line 1
query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid =
r.rid WHERE r.rid IN () in
/path/to/drupal-6.19/modules/user/user.module on
line 513.
Invalid argument supplied for foreach() in [warning]
/path/to/drupal-6.19/sites/all/modules/tac_lite/tac_lite.module
on line 428.
Command pm-enable needs a higher bootstrap level to run - you will [error]
need invoke drush from a more functional Drupal environment to run
this command.
The drush command 'en captcha' could not be executed.

Comments

soxofaan’s picture

Category: bug » support

None of those messages refer to source code from CAPTCHA, so I don't think the CAPTCHA module itself is responsible.
For example, /path/to/drupal-6.19/modules/user/user.module, line 1978 is:

 foreach (module_list() as $module) {
    $function = $module .'_user';
    // $null and $account need to be passed by reference.
    if (function_exists($function) && ($data = $function('categories', $null, $account, ''))) {

but the CAPTCHA module does not implement the hook_user hook.

The tac_lite module is mentioned in the messages, so maybe that one may be the culprit?

Does the problem also occur when enabling/disabling other modules?

wundo’s picture

Status: Active » Closed (outdated)