Browse Source

Added default status code setting.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
248e0cb916
  1. 3
      framework/yii/web/Response.php

3
framework/yii/web/Response.php

@ -249,6 +249,9 @@ class Response extends \yii\base\Response
*/
public function setStatusCode($value, $text = null)
{
if ($value === null) {
$value = 200;
}
$this->_statusCode = (int)$value;
if ($this->getIsInvalid()) {
throw new InvalidParamException("The HTTP status code is invalid: $value");

Loading…
Cancel
Save