getErrors() on a non-object .... CHtml.php on line 1370

Im using yii-1.0.4.r920 and following the 'form' documentation, however Im getting

Fatal error: Call to a member function getErrors() on a non-object in /my/server/path/framework/web/helpers/CHtml.php on line 1370

Any Ideas. The application is running fine till the CHtml stuff is called i.e. to create a form.

Quote

Im using yii-1.0.4.r920 and following the 'form' documentation, however Im getting

Fatal error: Call to a member function getErrors() on a non-object in /my/server/path/framework/web/helpers/CHtml.php on line 1370

Any Ideas. The application is running fine till the CHtml stuff is called i.e. to create a form.

Did you define the form model and created it in controller?

May be you want to provide some code for others to help you look into this.

I think the issue was that I wasn't passing the var with the Form Model to the view file

I had:

instead of:

Thanks

Dom