Skip to content

server error when saving out of office replies containing question marks #32

Description

Trying to save an out of office reply which contains a question mark fails with the following error

NOTICE: PHP message: PHP Fatal error:  Uncaught ValueError: The arguments array must contain 6 items, 2 given in /var/www/html/plugins/roundcube_toolbox/lib/Roundcube/rcube_toolbox_storage_sql.php:820
Stack trace:
#0 /var/www/html/plugins/roundcube_toolbox/lib/Roundcube/rcube_toolbox_storage_sql.php(820): vsprintf('UPDATE vacation...', Array)
#1 /var/www/html/plugins/roundcube_toolbox/toolbox.php(1562): rcube_toolbox_storage_sql->save_tool_data('user@tld....', Array)
#2 /var/www/html/program/lib/Roundcube/rcube_plugin_api.php(577): toolbox->save()
#3 /var/www/html/program/include/rcmail.php(255): rcube_plugin_api->exec_action('plugin.toolbox....')
#4 /var/www/html/index.php(278): rcmail->action_handler()
#5 {main}
  thrown in /var/www/html/plugins/roundcube_toolbox/lib/Roundcube/rcube_toolbox_storage_sql.php on line 820

this is probably due to the special treatment of question marks when formatting error messages

$query['sql'] = vsprintf(str_replace('?', "'%s'", $query['sql']), $query['data']);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions