drupal_get_messages

Definition

drupal_get_messages()
includes/bootstrap.inc, line 744

Description

Return all messages that have been set.

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

Code

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

  return $messages;
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.