return;
}
- if (!CRM_Utils_Array::value($prefix, $this->_session[$this->_key])) {
+ if (empty($this->_session[$this->_key][$prefix])) {
$this->_session[$this->_key][$prefix] = array();
}
}
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) {
'text' => $text,
'title' => $title,
'type' => $type,
- 'options' => $options ? json_encode($options) : NULL,
+ 'options' => $options ? $options : NULL,
);
}
}