[BUGFIX] Misleading error with empty USER_INT
authorPhilipp Gampe <forge.typo3.org@philippgampe.info>
Mon, 13 Feb 2012 17:50:22 +0000 (18:50 +0100)
committerTolleiv Nietsch <info@tolleiv.de>
Mon, 5 Mar 2012 20:42:21 +0000 (21:42 +0100)
Just skip rendering of a USER_INT which does not have any properties.

Change-Id: I8319f9a13a0d42f91d2e7e09c0993977279db933
Fixes: #23347, #30623
Releases: 4.5,4.6,4.7,4.8
Reviewed-on: http://review.typo3.org/9009
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
typo3/sysext/cms/tslib/content/class.tslib_content_user.php

index 40cfc50..dedeca2 100644 (file)
@@ -41,6 +41,11 @@ class tslib_content_User extends tslib_content_Abstract {
         * @return      string          Output
         */
        public function render($conf = array()) {
+               if (!is_array($conf) || empty($conf)) {
+                       $GLOBALS['TT']->setTSlogMessage('USER_INT without configuration.', 2);
+                       return '';
+               }
+
                $content = '';
                if ($this->cObj->getUserObjectType() === FALSE) {
                                // Come here only if we are not called from $TSFE->INTincScript_process()!