$ drush pm-uninstall -y migrate_example
WD php: Notice: Undefined property: stdClass::$required_by in drush_pm_uninstall() (line 1028 of                        [error]
/Users/mikeryan/bin/drush/commands/pm/pm.drush.inc).
WD php: Warning: array_keys() expects parameter 1 to be array, null given in drush_pm_uninstall() (line 1028 of         [error]
/Users/mikeryan/bin/drush/commands/pm/pm.drush.inc).
WD php: Warning: Invalid argument supplied for foreach() in drush_pm_uninstall() (line 1028 of                          [error]
/Users/mikeryan/bin/drush/commands/pm/pm.drush.inc).
The following modules will be uninstalled: migrate_example
Do you really want to continue? (y/n): y
migrate_example was successfully uninstalled.                                                                           [ok]
array_keys() expects parameter 1 to be array, null given in drush_pm_uninstall() (line 1028 of                          [warning]
/Users/mikeryan/bin/drush/commands/pm/pm.drush.inc).
Invalid argument supplied for foreach() in drush_pm_uninstall() (line 1028 of                                           [warning]
/Users/mikeryan/bin/drush/commands/pm/pm.drush.inc).

drush_pm_uninstall() is checking the module's required_by array to see if anything else needs to be disabled - unfortunately, required_by is a D7ism.

Comments

jonhattan’s picture

Version: All-versions-4.x-dev »
StatusFileSize
new1.24 KB

yes, we already have API to abstract this thing off drupal version. Committing attached patch.

jonhattan’s picture

Version: » All-versions-4.x-dev
Assigned: Unassigned » msonnabaum
Status: Active » Patch (to be ported)
osopolar’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new1.18 KB

Patch for 4.5 (works also for current 4.x-dev).

jonhattan’s picture

Status: Needs review » Patch (to be ported)

Thanks osopolar

osopolar’s picture

I thought this was the port. I am confused about the status of this issue.

nikosnikos’s picture

I'm also confused about the status but the patch #3 worked perfectly for me on drush 4.5. Thanks.

shark’s picture

Patch in #3 works on Drush 4.5.

msonnabaum’s picture

Status: Patch (to be ported) » Fixed

#3 looks fine to me. Committed.

Status: Fixed » Closed (fixed)

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