Roundcubemail: PHP 7.2: count(): Parameter must be an array or an object that implements Countable in program/lib/Roundcube/rcube_plugin_api.php on line 438

Created on 9 Jul 2017  路  7Comments  路  Source: roundcube/roundcubemail

I get the following error:
[09-Jul-2017 00:00:02 Europe/Berlin] PHP Warning: count(): Parameter must be an array or an object that implements Countable in program/lib/Roundcube/rcube_plugin_api.php on line 438

PHP 7.1
All dependencies installed
Latest master-branch of Roundcube

PHP backend bug

Most helpful comment

Fixed.

All 7 comments

Are you sure you're not using PHP 7.2? In that version count(null) would throw a warning, indeed. I'm unable to reproduce on PHP 7.1. Do you know how to reproduce? What plugins are you using?

Sorry Alec, my fault. It is 7.2 for testing purposes.

Plugins: 'archive', 'authres_status', 'contextmenu', 'emoticons', 'enigma', 'identicon', 'markasjunk2', 'managesieve', 'new_user_dialog', 'newmail_notifier', 'password', 'sauserprefs', 'show_additional_headers', 'show_pgp_mime', 'subscriptions_option', 'tinymce_config', 'userinfo', 'vcard_attachments', 'zipdownload'

Fixed.

Hello,

I am having this error on php 7.3, centos, roundcube:

PHP Warning: count(): Parameter must be an array or an object that implements Countable in /usr/share/roundcubemail/program/lib/Roundcube/rcube_plugin_api.php on line 406

Is this fixed also for php 7.3?

@ghost hopefully you figured this out already but it's likely you were using an older version of roundcube packed by you OS. They don't usually include the latest version of anything.

I get the same error on Debian 9, php7.3-fpm, RoundCube 1.3.10:

PHP Warning: count(): Parameter must be an array or an object that implements Countable in /usr/share/php/Mail/mimePart.php on line 314

This one comes from an external library (which also has been fixed) that is probably not up-to-date on Debian.

Was this page helpful?
0 / 5 - 0 ratings