Assume my site has votingapi enabled and fivestar disabled. If I do `disable votingapi`, i unneeded get warnings like:

Fivestar is already disabled.                                                                                                   [warning]
Fivestar Comments is already disabled.                                                                                          [warning]
Fivestar Comments is already disabled.     

Comments

adrian’s picture

i just get :

The following modules will be disabled: update
Do you really want to continue? (y/n): y
Update status was disabled successfully.                                                                                        [ok]
warning: array_search(): Wrong datatype for second argument in /Users/adrian/Projects/hosting/drush/commands/pm/pm.drush.inc on [warning]
line 304.
owen barton’s picture

Status: Active » Fixed

I fixed an issue where "nothing to do" resulted in an error (I made it an 'ok' log), but I couldn't reproduce either of your issues:

obarton@obarton-linux:~/workspace/drupal-6/sites/default$ drush dl votingapi fivestar
Project votingapi (6.x-2.0-rc2) downloaded to /home/obarton/workspace/drupal-6/sites/default/modules/.                          [success]
Project fivestar (6.x-1.13) downloaded to /home/obarton/workspace/drupal-6/sites/default/modules/.                              [success]
obarton@obarton-linux:~/workspace/drupal-6/sites/default$ drush disable votingapi
Voting API is already disabled.                                                                                                 [warning]
There were no modules that could be disabled.                                                                                   [ok]
obarton@obarton-linux:~/workspace/drupal-6/sites/default$ drush enable votingapi
The following modules will be enabled: votingapi
Do you really want to continue? (y/n): y
Voting API was enabled successfully.                                                                                            [ok]
obarton@obarton-linux:~/workspace/drupal-6/sites/default$ drush disable votingapi
The following modules will be disabled: votingapi
Do you really want to continue? (y/n): y
Voting API was disabled successfully.                                                                                           [ok]
obarton@obarton-linux:~/workspace/drupal-6/sites/default$ drush enable fivestar
The following modules will be enabled: fivestar, votingapi
Do you really want to continue? (y/n): y
Fivestar was enabled successfully.                                                                                              [ok]
Voting API was enabled successfully.                                                                                            [ok]
obarton@obarton-linux:~/workspace/drupal-6/sites/default$ drush disable fivestar
The following modules will be disabled: fivestar
Do you really want to continue? (y/n): y
Fivestar was disabled successfully.                                                                                             [ok]
obarton@obarton-linux:~/workspace/drupal-6/sites/default$ drush disable votingapi
The following modules will be disabled: votingapi
Do you really want to continue? (y/n): y
Voting API was disabled successfully.                                                                                           [ok]
obarton@obarton-linux:~/workspace/drupal-6/sites/default$ drush disable update
The following modules will be disabled: update
Do you really want to continue? (y/n): y
Update status was disabled successfully.                                                                                        [ok]
obarton@obarton-linux:~/workspace/drupal-6/sites/default$ drush disable update
Update status is already disabled.                                                                                              [warning]
There were no modules that could be disabled.                                                                                   [ok]

Perhaps a PHP version issue? Reopen if you can still reproduce!

moshe weitzman’s picture

i can't reproduce this now either.

@adrian - i was also seeing this error:

warning: array_search(): Wrong datatype for second argument in /Users/adrian/Projects/hosting/drush/commands/pm/pm.drush.inc on [warning]
line 304.

I stepped through and the cause was a module that had a string for dependencies instead of an array in its .info file. In other words, it was not fully converted to D6. If this becomes common error, we might want to handle it.

Status: Fixed » Closed (fixed)

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

AdrianB’s picture

Is this related?

Whenever I run disable it works ("...was disabled successfully") but then I always get:

warning: array_search(): Wrong datatype for second argument in       [warning]
/path/to/drush/commands/pm/pm.drush.inc on line 393.
warning: array_search(): Wrong datatype for second argument in       [warning]
/path/to/drush/commands/pm/pm.drush.inc on line 393.
warning: array_search(): Wrong datatype for second argument in       [warning]
/path/to/drush/commands/pm/pm.drush.inc on line 393.
warning: array_search(): Wrong datatype for second argument in       [warning]
/path/to/drush/commands/pm/pm.drush.inc on line 393.
owen barton’s picture

See #3 - this probably means you have a module whose info file has not been upgraded to D6.

AdrianB’s picture

I got this error on a number of modules. For instance, the Devel module. And I checked every .info file in the devel folder and I couldn't find any dependencies as strings (or maybe I didn't understand #3).

Island Usurper’s picture

Status: Closed (fixed) » Active

I think I tend to get this bug when I disable more than one (unrelated) module. It doesn't happen all of the time. It might also be related to #617428: Cancelling drush disable causes dependent modules to be disabled.

moshe weitzman’s picture

Status: Active » Closed (fixed)

i can't reproduce this. please reopen if still reproducible on current head.