]> git.mjollnir.org Git - moodle.git/commitdiff
Prevent some notices and process if $CFG->emoticons is not set or empty. MDL-12414...
authorstronk7 <stronk7>
Sun, 11 May 2008 23:34:29 +0000 (23:34 +0000)
committerstronk7 <stronk7>
Sun, 11 May 2008 23:34:29 +0000 (23:34 +0000)
lib/weblib.php

index ec287ffdf6b04630666c67921b50cc5695edd9a3..1b5dcb4b70b704654567720eddb5c5b304c782de 100644 (file)
@@ -2032,8 +2032,13 @@ function cleanAttributes2($htmlArray){
  * @return string
  */
 function replace_smilies(&$text) {
-///
+
     global $CFG;
+
+    if (empty($CFG->emoticons)) { /// No emoticons defined, nothing to process here
+        return;
+    }
+
     $lang = current_language();
     $emoticonstring = $CFG->emoticons;
     static $e = array();