I have the following code:
Where $model->person->emails is
Why, when I click the "edit" button of an entry in the resulting grid, do I get this "get_Class() Expects Parameter 1 To Be Object, Array Given" error?
$dp=new CArrayDataProvider($model->person->emails); $this->widget('zii.widgets.grid.CGridView', array('dataProvider'=>$dp, 'columns'=>array('address', array('class'=>'CButtonColumn'))));
Where $model->person->emails is
public function relations() { return array( 'emails' => array(self::HAS_MANY, 'Email', 'person_id'), // etc.
Why, when I click the "edit" button of an entry in the resulting grid, do I get this "get_Class() Expects Parameter 1 To Be Object, Array Given" error?