Commit bcc0741b authored by Dries's avatar Dries

- Patch #951486 by Damien Tournoud: invalid placeholders in exception messages during update.

parent 2079d300
......@@ -1561,7 +1561,8 @@ function watchdog_exception($type, Exception $exception, $message = NULL, $varia
// Use a default value if $message is not set.
if (empty($message)) {
$message = '%type: %message in %function (line %line of %file).';
// The exception message is run through check_plain() by _drupal_decode_exception().
$message = '%type: !message in %function (line %line of %file).';
}
// $variables must be an array so that we can add the exception information.
if (!is_array($variables)) {
......
......@@ -883,7 +883,8 @@ function update_do_one($module, $number, $dependency_map, &$context) {
require_once DRUPAL_ROOT . '/includes/errors.inc';
$variables = _drupal_decode_exception($e);
$ret['#abort'] = array('success' => FALSE, 'query' => t('%type: %message in %function (line %line of %file).', $variables));
// The exception message is run through check_plain() by _drupal_decode_exception().
$ret['#abort'] = array('success' => FALSE, 'query' => t('%type: !message in %function (line %line of %file).', $variables));
}
}
......
......@@ -517,7 +517,8 @@ protected function exceptionHandler($exception) {
'file' => $exception->getFile(),
));
require_once DRUPAL_ROOT . '/includes/errors.inc';
$this->error(t('%type: %message in %function (line %line of %file).', _drupal_decode_exception($exception)), 'Uncaught exception', _drupal_get_last_caller($backtrace));
// The exception message is run through check_plain() by _drupal_decode_exception().
$this->error(t('%type: !message in %function (line %line of %file).', _drupal_decode_exception($exception)), 'Uncaught exception', _drupal_get_last_caller($backtrace));
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment