title: htmlspecialchars() expects parameter 1 to be string, object given error in COdeIgniter
body: <p>When assigning a type casted array to codeigniter's session, I get this error: </p>
  
  <pre><code>A PHP Error was encountered 
  Severity: Warning
  
  Message: htmlspecialchars() expects parameter 1 to be string, object given
  
  Filename: libraries/Profiler.php
  
  Line Number: 514
  </code></pre>
  
  <p>Code in question:  </p>
  
  <pre><code>$guest = array('email' =&gt; 'empty', 'username' =&gt; 'Guest');
  $this-&gt;session-&gt;set_userdata(array('current_user' =&gt; (object)$guest));
  </code></pre>