I have created Controller,Model and View for a table.
I can see the data in grid view and controller actions are working fine
but when I try create a new entry for the model, it is throwing the below error
on the backend it is actually creating the entry.
Below is the error details in browser:
Invalid Parameter – yii\base\InvalidParamException
The HTTP status code is invalid:
1. in /Users/XXXX/Sites/yii-advanced/vendor/yiisoft/yii2/yii/web/Response.php at line 254
*/
public function setStatusCode($value, $text = null)
{
$this->_statusCode = (int)$value;
if ($this->getIsInvalid()) {
throw new InvalidParamException("The HTTP status code is invalid: $value");
}
if ($text === null) {
$this->statusText = isset(self::$httpStatuses[$this->_statusCode]) ? self::$httpStatuses[$this->_statusCode] : '';
} else {
$this->statusText = $text;
2. in /Users/XXXX/Sites/yii-advanced/vendor/yiisoft/yii2/yii/web/Response.php – yii\web\Response::setStatusCode()