It’s pretty strange, it worked before, but then suddenly when I come back, it show the error message:
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'skill-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'id',
array(
'header'=>'user',
'name'=>'user_id',
'value'=>'User::getName($data->user_id)'),
// other column
/*
I read the error message and it revealed that it unable to send $data->user_id to getName($id) function of User model:
Trying to get property of non-object
......
..\framework\base\CComponent.php(606) : eval()'d code(1): User::getName(null)
There is no way to fix it to me, anyone got this problem before?