Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

"get_Class() Expects Parameter 1 To Be Object, Array Given"

$
0
0
I have the following code:
$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?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>