Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vafschoen opened this issue Aug 12, 2024 · 0 comments

Comments

@vafschoen
Copy link

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']);

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

No branches or pull requests

1 participant