Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
A small issue turned up while doing some drush commands concerning configuration. PHP throws a lot warnings:
in_array() expects parameter 2 to be array, null given IgnoreFilter.php:85
Invalid argument supplied for foreach() IgnoreFilter.php:89
Since this is rather annoying I made a little patch to fix this. Hope this is of use to anyone else.
Comment | File | Size | Author |
---|---|---|---|
#5 | fix-php-warnings-in-drush.patch | 908 bytes | qzmenko |
| |||
fix-php-warnings-in-drush.patch | 1.12 KB | MPaans | |
|
Comments
Comment #2
bircherThanks for the contribution.
This is one way of getting rid of the error, but I think it would be better to make sure the plugin is always initialized properly and that
$this->configuration['ignored']
is always an array (empty if not set).Comment #3
bircherThe plugin constructor is the palce to do that.
Comment #4
narasimhan_gobear CreditAttribution: narasimhan_gobear commentedWe ran into the same problem. It happens whenever no modules are set to be ignored.
Comment #5
qzmenkoSame for me. Patch attached.
Comment #6
Dane Powell CreditAttribution: Dane Powell at Acquia commentedI can confirm the original issue, and that #5 fixes it. The approach also seems good.
Comment #8
bircherThanks for the contribution.