[BUGFIX] Default error FlashMessage has wrong severity
authorBastian Waidelich <bastian@typo3.org>
Thu, 29 Sep 2011 11:29:48 +0000 (13:29 +0200)
committerBastian Waidelich <bastian@typo3.org>
Thu, 29 Sep 2011 11:29:48 +0000 (13:29 +0200)
Currently, if controller::getErrorFlashMessage() returns a
string, an according flashmessage is created with the
default severity which happens to be "OK".
This change fixes this by setting the severity to "ERROR"
explicitly.

Change-Id: Ic2b9b8e105d3857abb07304967d9d6d2d57c4335

typo3/sysext/extbase/Classes/MVC/Controller/ActionController.php

index 810641c..14095fa 100644 (file)
@@ -445,7 +445,7 @@ class Tx_Extbase_MVC_Controller_ActionController extends Tx_Extbase_MVC_Controll
                if ($this->configurationManager->isFeatureEnabled('rewrittenPropertyMapper')) {
                        $errorFlashMessage = $this->getErrorFlashMessage();
                        if ($errorFlashMessage !== FALSE) {
-                               $this->flashMessageContainer->add($errorFlashMessage);
+                               $this->flashMessageContainer->add($errorFlashMessage, '', t3lib_FlashMessage::ERROR);
                        }
 
                        $referringRequest = $this->request->getReferringRequest();