Call to a member function getErrors() on a non-object

I got the blank rendered page and checked apache error log and saw this entry

[Tue Jun 01 19:19:55 2010] [error] [client] PHP Fatal error:  Call to a member function getErrors() on a non-object in /home/dmtrs/public_html/yii/framework/web/helpers/CHtml.php on line 1529

this happen before i


if i


just before i get the object.

Has anybody any idea???

Did not had the time to search for related issues will do later.

the error says that $form is not an object.

paste controller action and the view

The corect files are to my next post

From what I see…

In the update.php you call the _form.php with

<?php echo $this->renderPartial('_form', array('person'=>$person,'address'=>$address, 'update'=>true)); ?>

no ‘model’=>…

and in the _form.php you use a variable $model instead of $person or $adress

Sorry paste it wrong view

this is the proper one.





In your question you have


but in the source code you have

echo $form->errorSummary(array($person,$address));

and here $address is an array - not an object!

firstly if i remove the errorSummary line nothing happens either.

I have chnaged render to this in update action :





At least there should not be the error "call to a member function getErrors() on a non-object"…

I noticed that in the update.php you have echo renderpartial… so you need renderpartial to return it’s value not to echo it…

check the renderpartial $return parameter -

you should set it to true, by default is false and renderpartial returns null in that case…

Found the problem was that $address==null when calling

i had the same problem i replaced forms with CHtml and solved