Small defect in tutorial

www.yiiframework.com/doc/guide/1.1/en/topics.error


public function actionError()

{

    if($error=Yii::app()->errorHandler->error)

        $this->render('error', $error);

}

=>


public function actionError()

{

    if($error=Yii::app()->errorHandler->error)

        $this->render('error', 'error' => $error);

}

Newcomers may be confused, that variable "$error" is empty in view.

Your code is not good… because the second parameter should be an array - http://www.yiiframew…r#render-detail

The result of Yii::app()->errorHandler->error is an array ;) and that is documented on the page you are refering to…

and well explained in the tip:

Yes, it’s all my inattention :)