[BUGFIX] Don't save form protection error messages in session
[Packages/TYPO3.CMS.git] / t3lib / formprotection / class.t3lib_formprotection_backendformprotection.php
index 622747c..6a9648b 100644 (file)
@@ -130,7 +130,8 @@ class t3lib_formprotection_BackendFormProtection extends t3lib_formprotection_Ab
                        ),
                        '',
                        t3lib_FlashMessage::ERROR,
-                       TRUE
+                               // Do not save error message in session if we are in an Ajax action
+                       !(isset($GLOBALS['TYPO3_AJAX']) && $GLOBALS['TYPO3_AJAX'] === TRUE)
                );
                t3lib_FlashMessageQueue::addMessage($message);
        }