yii1.x - How to solve warning htmlspecialchars() expects parameter 1 to be string, object given in yii1? -


my controller code below.what htmlspecialchars() in code.

public function actionadmin() {     $model=new taskassigndevloper('search');     $model->unsetattributes();  // clear default values     if(isset($_get['taskassigndevloper']))         $model->attributes=$_get['taskassigndevloper'];      $this->render('admin',array(         'model'=>$model,     )); } 

my view file code

<?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',     ), ), 

)); ?>

in view file, have made relations. if relation doesn't have match table give type of error.

for eg. you assigning task developer , storing developer id in assign task table developer id not found in users table have list of developers.

for yii 2 tutorials :- yii 2 tutorials


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -