PHP Error

Object of class User could not be converted to string

C:\wamp\www\yii\framework\web\helpers\CHtml.php(1622)

1610                         $content.="<li>$error</li>\n";
1611                     if($firstError)
1612                         break;
1613                 }
1614             }
1615         }
1616         if($content!=='')
1617         {
1618             if($header===null)
1619                 $header='<p>'.Yii::t('yii','Please fix the following input errors:').'</p>';
1620             if(!isset($htmlOptions['class']))
1621                 $htmlOptions['class']=self::$errorSummaryCss;
1622             return self::tag('div',$htmlOptions,$header."\n<ul>\n$content</ul>".$footer);
1623         }
1624         else
1625             return '';
1626     }
1627 
1628     /**
1629      * Displays the first validation error for a model attribute.
1630      * @param CModel $model the data model
1631      * @param string $attribute the attribute name
1632      * @param array $htmlOptions additional HTML attributes to be rendered in the container div tag.
1633      * This parameter has been available since version 1.0.7.
1634      * @return string the error display. Empty if no errors are found.

Stack Trace

#1
+
 C:\wamp\www\hewage\protected\views\lawyer\_form.php(10): CActiveForm->errorSummary(Lawyer, User)
05     'enableAjaxValidation'=>false,
06 )); ?>
07 
08     <p class="note">Fields with <span class="required">*</span> are required.</p>
09 
10     <?php echo $form->errorSummary($model,$model2); ?>
11 
12     <div class="row">
13         <?php echo $form->labelEx($model,'name'); ?>
14         <?php echo $form->textField($model,'name',array('size'=>50,'maxlength'=>50)); ?>
15         <?php echo $form->error($model,'name'); ?>
#5
+
 C:\wamp\www\hewage\protected\views\lawyer\create.php(15): CController->renderPartial("_form", array("model" => Lawyer, "model2" => User))
10 );
11 ?>
12 
13 <h1>Create Lawyer</h1>
14 
15 <?php echo $this->renderPartial('_form', array('model'=>$model,'model2'=>$model2)); ?>
#10
+
 C:\wamp\www\hewage\protected\controllers\LawyerController.php(100): CController->render("create", array("model" => Lawyer, "model2" => User))
095         }
096 
097         $this->render('create',array(
098             'model'=>$model,
099             'model2'=>$model2,
100         ));
101     }
102 
103     /**
104      * Updates a particular model.
105      * If update is successful, the browser will be redirected to the 'view' page.
2011-12-28 01:27:25 Apache/2.2.21 (Win32) PHP/5.3.8 Yii Framework/1.1.8