diff --git a/CHANGELOG b/CHANGELOG index 90f2bfd87..345bb6080 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,6 +12,7 @@ CHANGELOG Roundcube Webmail - Elastic: Fix bug where it was possible to switch editor mode when 'htmleditor' was in 'dont_override' (#7143) - Fix so messages in threads with no root aren't displayed separately (#4999) - Fix regression where "Open in new window" action didn't work (#7155) +- Fix PHP Warning: array_filter() expects parameter 1 to be array, null given in subscriptions_option plugin (#7165) RELEASE 1.4.2 ------------- diff --git a/plugins/subscriptions_option/subscriptions_option.php b/plugins/subscriptions_option/subscriptions_option.php index e9eaecc90..06e72e78a 100644 --- a/plugins/subscriptions_option/subscriptions_option.php +++ b/plugins/subscriptions_option/subscriptions_option.php @@ -79,13 +79,15 @@ class subscriptions_option extends rcube_plugin if (!$rcmail->config->get('use_subscriptions', true)) { $storage = $rcmail->get_storage(); - $folders = $storage->list_folders_direct(); - $folders = array_filter($folders, function($folder) use ($storage) { - $attrs = $storage->folder_attributes($folder); - return !in_array_nocase('\\Noselect', $attrs); - }); - $args['folders'] = $folders; + if ($folders = $storage->list_folders_direct()) { + $folders = array_filter($folders, function($folder) use ($storage) { + $attrs = $storage->folder_attributes($folder); + return !in_array_nocase('\\Noselect', $attrs); + }); + + $args['folders'] = $folders; + } } return $args;