From 6e3ad1ec3cdeaef821ae6ff96762bec038ded36e Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 25 Jul 2007 11:19:54 +0000 Subject: Fixed a TTextHighlighter bug. --- framework/Web/UI/WebControls/TTextHighlighter.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/framework/Web/UI/WebControls/TTextHighlighter.php b/framework/Web/UI/WebControls/TTextHighlighter.php index cacdc85a..64791fc3 100644 --- a/framework/Web/UI/WebControls/TTextHighlighter.php +++ b/framework/Web/UI/WebControls/TTextHighlighter.php @@ -164,7 +164,15 @@ class TTextHighlighter extends TTextProcessor */ public function processText($text) { - if(($highlighter=Text_Highlighter::factory($this->getLanguage()))===false) + try + { + $highlighter=Text_Highlighter::factory($this->getLanguage()); + } + catch(Exception $e) + { + $highlighter=false; + } + if($highlighter===false) return ('
'.htmlentities(trim($text)).''); $options["use_language"]=true; -- cgit v1.2.3