You are here

function drupal_get_messages in Drupal 4

Same name and namespace in other branches
  1. 8 core/includes/bootstrap.inc \drupal_get_messages()
  2. 5 includes/bootstrap.inc \drupal_get_messages()
  3. 6 includes/bootstrap.inc \drupal_get_messages()
  4. 7 includes/bootstrap.inc \drupal_get_messages()

Return all messages that have been set.

As a side effect, this function clears the message queue.

1 call to drupal_get_messages()
theme_status_messages in includes/theme.inc
Returns themed set of status and/or error messages. The messages are grouped by type.

File

includes/bootstrap.inc, line 744
Functions that need to be loaded on every Drupal request.

Code

function drupal_get_messages() {
  if ($messages = drupal_set_message()) {
    unset($_SESSION['messages']);
  }
  return $messages;
}