Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2013-12-30-11-03-32
[civicrm-core.git] / CRM / Core / Session.php
index d667b837255c79ecd173a89864e1ebdd24a48b7c..c9b047c0da58c8301cef5650ef251739783a0f36 100644 (file)
@@ -496,7 +496,7 @@ class CRM_Core_Session {
     if (!isset(self::$_singleton->_session[self::$_singleton->_key]['status'])) {
       self::$_singleton->_session[self::$_singleton->_key]['status'] = array();
     }
-    if ($text) {
+    if ($text || $title) {
       if ($options['unique']) {
         foreach (self::$_singleton->_session[self::$_singleton->_key]['status'] as $msg) {
           if ($msg['text'] == $text && $msg['title'] == $title) {
@@ -509,7 +509,7 @@ class CRM_Core_Session {
         'text' => $text,
         'title' => $title,
         'type' => $type,
-        'options' => $options ? json_encode($options) : NULL,
+        'options' => $options ? $options : NULL,
       );
     }
   }