X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FSession.php;h=20ba2ebf098c2895c3fcfca1a67982276a65ba8a;hb=8381af809c027065ceb28f18b5530ffb3a51ada3;hp=f3d1c169f52223a2da3d65da8e7a7d3c847e585b;hpb=13c1cf91881e22bbcc38024c645736a3fc6fad4a;p=civicrm-core.git diff --git a/CRM/Core/Session.php b/CRM/Core/Session.php index f3d1c169f5..20ba2ebf09 100644 --- a/CRM/Core/Session.php +++ b/CRM/Core/Session.php @@ -88,7 +88,7 @@ class CRM_Core_Session { /** * singleton function used to manage this object * - * @return CRM_CoreSession + * @return CRM_Core_Session * @static */ static function &singleton() { @@ -179,7 +179,7 @@ class CRM_Core_Session { return; } - if (!CRM_Utils_Array::value($prefix, $this->_session[$this->_key])) { + if (empty($this->_session[$this->_key][$prefix])) { $this->_session[$this->_key][$prefix] = array(); } } @@ -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, ); } }