1
我的控制器代碼位於下方。此代碼中的htmlspecialchars()是什麼。如何解決警告htmlspecialchars()期望參數1是字符串,在yii1中給出的對象?
public function actionAdmin()
{
$model=new TaskAssignDevloper('search');
$model->unsetAttributes(); // clear any default values
if(isset($_GET['TaskAssignDevloper']))
$model->attributes=$_GET['TaskAssignDevloper'];
$this->render('admin',array(
'model'=>$model,
));
}
我的視圖文件的代碼是這樣
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'task-assign-devloper-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'id',
'teamleader0',
'task0.title',
'developer0.username',
'description',
array(
'class'=>'CButtonColumn',
),
),
)); ?>