manual merge of fixes for CRM-13981
[civicrm-core.git] / CRM / Core / Session.php
index 7390bd19599e979cc134add6cf76176417837659..20ba2ebf098c2895c3fcfca1a67982276a65ba8a 100644 (file)
@@ -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();
     }
   }
@@ -509,7 +509,7 @@ class CRM_Core_Session {
         'text' => $text,
         'title' => $title,
         'type' => $type,
-        'options' => $options ? json_encode($options) : NULL,
+        'options' => $options ? $options : NULL,
       );
     }
   }