summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
authorxue <>2007-07-25 11:19:54 +0000
committerxue <>2007-07-25 11:19:54 +0000
commit6e3ad1ec3cdeaef821ae6ff96762bec038ded36e (patch)
tree4200e4938e04191c004e82b341f680e1858baaf0 /framework/Web/UI
parentc4062970b2868016d4746598dc2eeafdef2e09c5 (diff)
Fixed a TTextHighlighter bug.
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/WebControls/TTextHighlighter.php10
1 files changed, 9 insertions, 1 deletions
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 ('<pre>'.htmlentities(trim($text)).'</pre>');
$options["use_language"]=true;