Browse Source

Removed headers in ErrorHandler.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
172f40aada
  1. 2
      framework/yii/base/ErrorHandler.php

2
framework/yii/base/ErrorHandler.php

@ -90,6 +90,8 @@ class ErrorHandler extends Component
$useErrorView = !YII_DEBUG || $exception instanceof UserException; $useErrorView = !YII_DEBUG || $exception instanceof UserException;
$response = Yii::$app->getResponse(); $response = Yii::$app->getResponse();
$response->getHeaders()->removeAll();
if ($useErrorView && $this->errorAction !== null) { if ($useErrorView && $this->errorAction !== null) {
$result = Yii::$app->runAction($this->errorAction); $result = Yii::$app->runAction($this->errorAction);
if ($result instanceof Response) { if ($result instanceof Response) {

Loading…
Cancel
Save