Prerequisites
Describe the issue
I've observed two plugins fail with the error message:
PHP Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given
The first plugin is managesieve, when opening a message in its own window (double click), but not in the preview pane. The relevant trace is given below. The second plugin is easy_unsubscribe, as reported here: Neoboffin/roundcube-easy-unsubscribe#15
In both cases, this seems to affect only message newly received after the 1.7 upgrade.
The (hopefully) relevant section of one of the affected messages is as follows:
From: FreeBSD Errata Notices <[email protected]>
To: FreeBSD Errata Notices <[email protected]>
Subject: FreeBSD Errata Notice FreeBSD-EN-26:13.freebsd-update
Reply-To: [email protected]
Precedence: bulk
Message-Id: <[email protected]>
Date: Wed, 20 May 2026 22:23:02 +0000 (UTC)
List-Id: Project Announcements [moderated] <freebsd-announce.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-announce
List-Help: <mailto:[email protected]>
List-Post: <mailto:[email protected]>
List-Subscribe: <mailto:[email protected]>
List-Unsubscribe: <mailto:[email protected]>
X-BeenThere: [email protected]
Sender: [email protected]
List-Id: <freebsd-announce.FreeBSD.org>
List-Post: <mailto:[email protected]>
List-Help: <mailto:[email protected]>
List-Subscribe: <mailto:[email protected]>
List-Unsubscribe: <mailto:[email protected]>
List-Owner: <mailto:[email protected]>
Precedence: list
X-Rspamd-Bar: -------
What browser(s) are you seeing the problem on?
Firefox
What version of PHP are you using?
8.4
What version of Roundcube are you using?
1.7
JavaScript errors
No response
PHP errors
PHP Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /[...]/Roundcube/plugins/managesieve/managesieve.php:324
Stack trace:
#0 /[...]/Roundcube/plugins/managesieve/managesieve.php(324): preg_match()
#1 /[...]/Roundcube/plugins/managesieve/managesieve.php(224): managesieve->parse_headers()
#2 /[...]/Roundcube/program/lib/Roundcube/rcube_plugin_api.php(496): managesieve->mail_headers()
#3 /[...]/Roundcube/program/actions/mail/show.php(484): rcube_plugin_api->exec_hook()
#4 /[...]/Roundcube/program/include/rcmail_output_html.php(1498): rcmail_action_mail_show::message_headers()
#5 [internal function]: rcmail_output_html->xml_command()
#6 /[...]/Roundcube/program/include/rcmail_output_html.php(1342): preg_replace_callback()
#7 /[...]/Roundcube/program/include/rcmail_output_html.php(815): rcmail_output_html->parse_xml()
#8 /[...]/Roundcube/program/include/rcmail_output_html.php(649): rcmail_output_html->parse()
#9 /[...]/Roundcube/program/actions/mail/show.php(163): rcmail_output_html->send()
#10 /[...]/Roundcube/program/include/rcmail.php(280): rcmail_action_mail_show->run()
#11 /[...]/Roundcube/public_html/index.php(265): rcmail->action_handler()
#12 {main}
thrown in /[...]/Roundcube/plugins/managesieve/managesieve.php on line 324
Prerequisites
Describe the issue
I've observed two plugins fail with the error message:
PHP Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array givenThe first plugin is managesieve, when opening a message in its own window (double click), but not in the preview pane. The relevant trace is given below. The second plugin is easy_unsubscribe, as reported here: Neoboffin/roundcube-easy-unsubscribe#15
In both cases, this seems to affect only message newly received after the 1.7 upgrade.
The (hopefully) relevant section of one of the affected messages is as follows:
What browser(s) are you seeing the problem on?
Firefox
What version of PHP are you using?
8.4
What version of Roundcube are you using?
1.7
JavaScript errors
No response
PHP errors