From 4502d5c6ae51cf94d52c7adab94fdb806c09bbb1 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Wed, 26 Dec 2012 16:36:09 +0400 Subject: [PATCH] fixed index errors in error handler --- framework/base/ErrorHandler.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/framework/base/ErrorHandler.php b/framework/base/ErrorHandler.php index 2ad8f29..250c403 100644 --- a/framework/base/ErrorHandler.php +++ b/framework/base/ErrorHandler.php @@ -18,6 +18,8 @@ namespace yii\base; * @author Qiang Xue * @since 2.0 */ +use yii\util\VarDumper; + class ErrorHandler extends ApplicationComponent { /** @@ -252,14 +254,17 @@ class ErrorHandler extends ApplicationComponent } else { $cssClass = 'app expanded'; } - $hasCode = $t['file'] !== 'unknown' && is_file($t['file']); + + $hasCode = isset($t['file']) && $t['file'] !== 'unknown' && is_file($t['file']); echo "#$n"; echo '
'; if ($hasCode) { echo '
+
-
'; } echo ' '; - echo $this->htmlEncode($t['file']) . '(' . $t['line'] . '): '; + if(isset($t['file'])) { + echo $this->htmlEncode($t['file']) . '(' . $t['line'] . '): '; + } if (!empty($t['class'])) { echo '' . $t['class'] . '' . $t['type']; }