I need to disconnect the error message session in magento for the code below.
Mage::getSingleton('core/session')->addError($message);
Can anyone help me?
You should be able to use the following code, although it will return all messages (it will not repeat them), it will clear them:
Mage::getSingleton('core/session')->getMessages(true); // The true is for clearing them after loading them
Hope this answers your question. ^ _ ^