commit 74df1e9a28f8508c9f5e1bb6c1e50daf2e9d9705 Author: Joel Pittet Date: Mon Aug 3 21:56:28 2015 -0700 docs diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 4be3e9e..b81860d 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -514,10 +514,10 @@ function watchdog_exception($type, Exception $exception, $message = NULL, $varia * drupal_set_message(t('An error occurred and processing did not complete.'), 'error'); * @endcode * - * @param array|string $message + * @param string|array $message * (optional) The translated message to be displayed to the user. For * consistency with other messages, it should begin with a capital letter and - * end with a period or a render array. + * end with a period. A render array may also be provided for markup. * @param string $type * (optional) The message's type. Defaults to 'status'. These values are * supported: @@ -610,7 +610,9 @@ function drupal_get_messages($type = NULL, $clear_queue = TRUE) { // the messages also needs to be stored in the session. We retrieve the // safe status here and determine whether to mark the string as safe or // let autoescape do its thing. See drupal_set_message(). - if ($message['safe']) { // Only set when the message is not an array. + // It's only nessasary to set the message as 'safe' when the message is + // not a renderable array. + if ($message['safe']) { $message['message'] = SafeMarkup::set($message['message']); } $messages[$message_type][$key] = $message['message'];