[BUGFIX] RTE is not loading in IE8, when used with feedit
authorStefan Aebischer <typo3@pixtron.ch>
Mon, 3 Sep 2012 12:50:30 +0000 (13:50 +0100)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 9 Oct 2012 20:57:47 +0000 (22:57 +0200)
Solution: Avoid calls to undefined console methods

Change-Id: I6df37fde56bd01c8078fb7ad889aa50e1b29f842
Fixes: #40558
Releases: 6.0, 4.7, 4.6
Reviewed-on: http://review.typo3.org/15463
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js

index 1440381..d10f45e 100644 (file)
@@ -101,12 +101,13 @@ Ext.apply(HTMLArea, {
                        var type = 'info';
                }
                if (typeof(console) !== 'undefined' && typeof(console) === 'object') {
-                               // If console is TYPO3.Backend.DebugConsole, write only error messages
+                       // If console is TYPO3.Backend.DebugConsole, write only error messages
                        if (Ext.isFunction(console.addTab)) {
                                if (type === 'error') {
                                        console[type](str);
                                }
-                       } else {
+                       // IE may not have any console
+                       } else if (typeof(console[type]) !== 'undefined') {
                                console[type](str);
                        }
                }