Minor refactoring.

This commit is contained in:
Qiang Xue
2013-06-10 11:26:56 -04:00
parent 3fc1900877
commit 9806563f7f
4 changed files with 49 additions and 16 deletions

View File

@@ -7,6 +7,7 @@
namespace yii\base;
use yii\web\Response;
/**
* HttpException represents an exception caused by an improper request of the end-user.
@@ -43,8 +44,8 @@ class HttpException extends UserException
*/
public function getName()
{
if (isset(\yii\web\Response::$statusTexts[$this->statusCode])) {
return \yii\web\Response::$statusTexts[$this->statusCode];
if (isset(Response::$httpStatuses[$this->statusCode])) {
return Response::$httpStatuses[$this->statusCode];
} else {
return 'Error';
}