Fixed bug #12196: PHP warning in FE with activated DLOG and mbstring set as t3lib_cs_...
authorRupert Germann <rupi@gmx.li>
Thu, 15 Oct 2009 20:30:40 +0000 (20:30 +0000)
committerRupert Germann <rupi@gmx.li>
Thu, 15 Oct 2009 20:30:40 +0000 (20:30 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6152 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index af739ce..7c8a71f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 2009-10-15  Rupert Germann  <rupi@gmx.li>
 
        * Fixed bug #8728: PHP Warning, if SQL error occurs in class t3lib_db in functions which depend on an existing resultset (thanks to Felix Oertel)
+       * Fixed bug #12196: PHP warning in FE with activated DLOG and mbstring set as t3lib_cs_utils
 
 2009-10-14  Oliver Hader  <oliver@typo3.org>
 
index 6a622c3..02a144e 100644 (file)
@@ -624,7 +624,8 @@ final class t3lib_div {
                if (is_object($GLOBALS['LANG'])) {
                        return $GLOBALS['LANG']->csConvObj->crop($GLOBALS['LANG']->charSet, $string, $chars, $appendString);
                } elseif (is_object($GLOBALS['TSFE'])) {
-                       return $GLOBALS['TSFE']->csConvObj->crop($GLOBALS['TSFE']->renderCharset, $string, $chars, $appendString);
+                       $charSet = ($GLOBALS['TSFE']->renderCharset != '' ? $GLOBALS['TSFE']->renderCharset : $GLOBALS['TSFE']->defaultCharSet);
+                       return $GLOBALS['TSFE']->csConvObj->crop($charSet, $string, $chars, $appendString);
                } else {
                                // this case should not happen
                        $csConvObj = t3lib_div::makeInstance('t3lib_cs');