]> git.mjollnir.org Git - moodle.git/commitdiff
Avoid some minor notices and warnings (reported as bug 2814 to Typo3 team)
authorstronk7 <stronk7>
Thu, 9 Mar 2006 17:29:58 +0000 (17:29 +0000)
committerstronk7 <stronk7>
Thu, 9 Mar 2006 17:29:58 +0000 (17:29 +0000)
(http://bugs.typo3.org/view.php?id=2814)

lib/textlib.class.php

index faacd80c832ddccb28dc0fdb8ac64bcd54ba10ef..ea1b87df7975c77c8ae5eefaf0314522ba1e4978 100644 (file)
@@ -175,7 +175,12 @@ class textlib {
     */
 
     function specialtoascii($text,$charset='utf-8') {
-        return $this->typo3cs->specCharsToASCII(strtolower($charset),$text);
+    /// Avoid some notices from Typo3 code
+        $oldlevel = error_reporting(E_PARSE);
+        $result = $this->typo3cs->specCharsToASCII(strtolower($charset),$text);
+    /// Restore original debug level
+        error_reporting($oldlevel);
+        return $result;
     }
 
 }