The $error is passed to the plugin, but can't be overwritten by the plugin. I temporarily fixed this for me by using 'error' => &$error, but I think there might be a better solution. Other hooks use $plugin = $this->plugins->exec_hook(...) and expect that the arguments will be returned. Maybe this should be implemented here as well?
Hi,
I noticed that if hooking into "message_send_error" and changing the error message in a plugin like
does not change the displayed error message (it still is "smtperror"). This is because here: https://github.com/roundcube/roundcubemail/blob/5ac44fd4ed0aa32858ef9b151373750ea846f027/program/lib/Roundcube/rcube.php#L1773
The
$error
is passed to the plugin, but can't be overwritten by the plugin. I temporarily fixed this for me by using'error' => &$error
, but I think there might be a better solution. Other hooks use$plugin = $this->plugins->exec_hook(...)
and expect that the arguments will be returned. Maybe this should be implemented here as well?(Using Roundcube 1.4.11)