Permalink
Browse files

(Fixes issue 3096) better fix for error reporting

  • Loading branch information...
1 parent 0b0e3af commit c958d4a116bfecc06d1a8882fc09facd4236f664 mdomba committed Jan 11, 2012
Showing with 5 additions and 11 deletions.
  1. +5 −11 framework/views/exception.php
@@ -1,16 +1,10 @@
-<?php
- function e($text)
- {
- return htmlspecialchars($text,ENT_QUOTES,Yii::app()->charset);
- }
-?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<title><?php echo e($data['type'])?></title>
+<title><?php echo $data['type']; ?></title>
<style type="text/css">
/*<![CDATA[*/
@@ -167,11 +161,11 @@ function e($text)
<h1><?php echo $data['type']?></h1>
<p class="message">
- <?php echo nl2br(e($data['message']))?>
+ <?php echo nl2br(htmlspecialchars($data['message'],ENT_QUOTES,Yii::app()->charset))?>
</p>
<div class="source">
- <p class="file"><?php echo e($data['file'])."({$data['line']})"?></p>
+ <p class="file"><?php echo htmlspecialchars($data['file'],ENT_QUOTES,Yii::app()->charset)."({$data['line']})"?></p>
<?php echo $this->renderSourceCode($data['file'],$data['line'],$this->maxSourceLines); ?>
</div>
@@ -201,13 +195,13 @@ function e($text)
<?php endif; ?>
<?php
echo '&nbsp;';
- echo e($trace['file'])."(".$trace['line'].")";
+ echo htmlspecialchars($data['file'],ENT_QUOTES,Yii::app()->charset)."(".$trace['line'].")";
echo ': ';
if(!empty($trace['class']))
echo "<strong>{$trace['class']}</strong>{$trace['type']}";
echo "<strong>{$trace['function']}</strong>(";
if(!empty($trace['args']))
- echo e($this->argumentsToString($trace['args']));
+ echo htmlspecialchars($this->argumentsToString($trace['args']),ENT_QUOTES,Yii::app()->charset);
echo ')';
?>
</div>

0 comments on commit c958d4a

Please sign in to comment.