Skip to content

Comments

Filters 2.2.0#2

Open
noisev2 wants to merge 87 commits intogcdsm12:masterfrom
roundcubevnz:filters-2.2.0
Open

Filters 2.2.0#2
noisev2 wants to merge 87 commits intogcdsm12:masterfrom
roundcubevnz:filters-2.2.0

Conversation

@noisev2
Copy link

@noisev2 noisev2 commented May 2, 2023

Days ago the following packages updated on FreeBSD:

php80 upgraded: 8.0.26 -> 8.0.28_1
php80-pdo upgraded: 8.0.26 -> 8.0.28_1
php80-zip upgraded: 8.0.26 -> 8.0.28_1
php80-iconv upgraded: 8.0.26 -> 8.0.28_1
php80-fileinfo upgraded: 8.0.26 -> 8.0.28_1
php80-pdo_mysql upgraded: 8.0.26 -> 8.0.28_1
php80-session upgraded: 8.0.26 -> 8.0.28_1
php80-dom upgraded: 8.0.26 -> 8.0.28_1
php80-xml upgraded: 8.0.26 -> 8.0.28_1
php80-ctype upgraded: 8.0.26 -> 8.0.28_1
php80-exif upgraded: 8.0.26 -> 8.0.28_1
php80-mbstring upgraded: 8.0.26 -> 8.0.28_1
php80-intl upgraded: 8.0.26_1 -> 8.0.28_1
php80-filter upgraded: 8.0.26 -> 8.0.28_1
php80-curl upgraded: 8.0.26 -> 8.0.28_1
roundcube-php80 upgraded: 1.6.0,1 -> 1.6.1,1

Due to this, the plugin stopped working and the webmail didn't show any inbox email due to Internal Server Error.

From the logs i saw:

[28-Apr-2023 08:59:13 UTC] PHP Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in /usr/local/www/roundcube/plugins/filters/filters.php:84 Stack trace: #0 /usr/local/www/roundcube/plugins/filters/filters.php(84): method_exists(NULL, 'get_mailbox_nam...') #1 /usr/local/www/roundcube/program/lib/Roundcube/rcube_plugin_api.php(518): filters->filters_checkmsg(Array) #2 /usr/local/www/roundcube/program/actions/mail/index.php(468): rcube_plugin_api->exec_hook('messages_list', Array) #3 /usr/local/www/roundcube/program/actions/mail/list.php(123): rcmail_action_mail_index::js_message_list(Array, false, Array) #4 /usr/local/www/roundcube/program/include/rcmail.php(282): rcmail_action_mail_list->run(Array) #5 /usr/local/www/roundcube/index.php(278): rcmail->action_handler() #6 {main} thrown in /usr/local/www/roundcube/plugins/filters/filters.php on line 84

My workaround was to replace this string in roundcube/plugins/filters/filters.php (line #84):

if (method_exists($this->rc->imap,'get_mailbox_name')) {

With this:

if ((is_string($this->rc->imap) || is_object($this->rc->imap)) && method_exists($this->rc->imap,'get_mailbox_name')) {

The webmail started working again and the filters too.
I am creating this PR to allow the owner to create an update with official fix.

tatsuyaueda and others added 30 commits August 20, 2015 10:35
Added additional translations: Japanese - thanks to tatsuyaueda.
Added PHP requirements
Add config.inc.php
Add config.inc.php
Add config.inc.php
Fix "decode and search BASE64 messages"
Fix "decode and search BASE64 messages"
Added uk_UA.inc, thanks to Dmitro Gnatoyko
Added additional translations: Ukrainian - thanks to Dmitro Gnatoyko ([email protected])
When you first install filters plugin, there is an error with invalid argument supplied to foreach cycle on line 240, the rest of code crashes & it's not even shown the submit button then until this fix
Turkish lang file creatin. Türkçe dil dosyası eklendi.
Update Spanish translation, including a missing string
Fix for roundcube 1.2.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.