From 172f40aadaf1de54f7c05d98dfc57a5664a617a7 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Fri, 14 Jun 2013 17:06:01 -0400 Subject: [PATCH] Removed headers in ErrorHandler. --- framework/yii/base/ErrorHandler.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/yii/base/ErrorHandler.php b/framework/yii/base/ErrorHandler.php index 1e6671b..338a392 100644 --- a/framework/yii/base/ErrorHandler.php +++ b/framework/yii/base/ErrorHandler.php @@ -90,6 +90,8 @@ class ErrorHandler extends Component $useErrorView = !YII_DEBUG || $exception instanceof UserException; $response = Yii::$app->getResponse(); + $response->getHeaders()->removeAll(); + if ($useErrorView && $this->errorAction !== null) { $result = Yii::$app->runAction($this->errorAction); if ($result instanceof Response) {