drush pmu config_devel
The following extensions will be uninstalled: config_devel
Do you really want to continue? (y/n): y
array_filter() expects parameter 1 to be array, null given             [warning]
ConfigDevelAutoExportSubscriber.php:91
TypeError: Argument 2 passed to                                        [error]
Drupal\config_devel\EventSubscriber\ConfigDevelAutoExportSubscriber::writeBackConfig()
must be of the type array, null given

Comments

joachim created an issue. See original summary.

znak’s picture

Assigned: Unassigned » znak
znak’s picture

Patch for solution problem with uninstalling this module. Please, check up.

benjy’s picture

Status: Active » Needs review
+++ b/src/EventSubscriber/ConfigDevelAutoExportSubscriber.php
@@ -86,10 +86,13 @@ class ConfigDevelAutoExportSubscriber extends ConfigDevelSubscriberBase implemen
+    if(is_array($auto_export)) {

Interesting that this breaks on uninstall, should this be !empty()

znak’s picture

Because first argument the function array_filter() should be an array

nevergone’s picture

Status: Needs review » Reviewed & tested by the community

#3 tested and works well!

benjy’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new875 bytes

I've simplified the patch as attached, does anyone want to write a test for this?

nevergone’s picture

I don't know how this test, but if you write, I will definitely learn from it.

nevergone’s picture

Status: Needs review » Reviewed & tested by the community

#7 tested and works well! Thanks! :)

benjy’s picture

Assigned: znak » Unassigned
Status: Reviewed & tested by the community » Fixed

Committed and pushed.

  • benjy committed 6da1321 on 8.x-1.x
    Issue #2845302 by Znak, benjy, nevergone: drush crashes when...

Status: Fixed » Closed (fixed)

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