summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-10-12 02:34:48 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-10-12 02:34:48 -0400
commitf09fb9ec7c506f12d7f2498faa1a3f3d51d16547 (patch)
tree0903e1d12bf1511e16fa3b4bbea1350900daf365
parent6c6088e492d93b1475eb629430cc33af62dc5d70 (diff)
downloadbrdo-f09fb9ec7c506f12d7f2498faa1a3f3d51d16547.tar.gz
brdo-f09fb9ec7c506f12d7f2498faa1a3f3d51d16547.tar.bz2
Issue #1845104 by dcam, longwave, thehong, er.pushpinderrana, martin_q, David_Rothstein: drupal_set_message('0') results in no output rather than outputting "0"
-rw-r--r--CHANGELOG.txt2
-rw-r--r--includes/bootstrap.inc2
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4d4b4c4d9..98f4bca25 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,8 @@
Drupal 7.40, xxxx-xx-xx (development version)
-----------------------
+- Made drupal_set_message() display and return messages when "0" is passed in
+ as the message to set.
- Fixed non-functional "Files displayed by default" setting on file fields.
- The "worker callback" provided in hook_cron_queue_info() and the "finished"
callback specified during batch processing can now be any PHP callable
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index b2f2b042e..086cef0a9 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1780,7 +1780,7 @@ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NO
* @see theme_status_messages()
*/
function drupal_set_message($message = NULL, $type = 'status', $repeat = TRUE) {
- if ($message) {
+ if ($message || $message === '0' || $message === 0) {
if (!isset($_SESSION['messages'][$type])) {
$_SESSION['messages'][$type] = array();
}