title: Magento get session messages
body: <p>I am trying to access Magento's current session's messages (ones written by addError).</p>
  
  <p>I am doing this from inside of the Cart model.</p>
  
  <p><code>$smessages = Mage::getSingleton('checkout/session')-&gt;getMessages(true);</code></p>
  
  <p>Returns an array of all messages correctly.</p>
  
  <p>However, when I try to "foreach" through $smessages, I get nothing. The idea is to then use getText() within the loop to get each individual message.</p>
  
  <pre><code>foreach ($smessages as $smessage) {
    Mage::log($smessage);
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>