[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)
committerGeorg Ringer <mail@ringerge.org>
Tue, 6 Mar 2012 05:42:58 +0000 (06:42 +0100)
Just skip rendering of a USER_INT which does not have any properties.

Change-Id: Id8c863470a86bd59bfb2b83d7fdfd5579f79015b
Fixes: #23347, #30623
Releases: 4.5,4.6,4.7,4.8
Reviewed-on: http://review.typo3.org/9395
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/cms/tslib/content/class.tslib_content_user.php

index 41c0a24..d73ffed 100644 (file)
@@ -42,6 +42,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()!
@@ -66,4 +71,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_user.php']);
 }
 
-?>
\ No newline at end of file
+?>