i have problem with give comment in post view in yii
<p>i want to give the comments in the views form &amp; i follow the function..</p>

<pre><code>&lt;?php if(Yii::app()-&gt;user-&gt;hasFlash('commentSubmitted')): ?&gt;
        &lt;div class="flash-success"&gt;
            &lt;?php echo Yii::app()-&gt;user-&gt;getFlash('commentSubmitted'); ?&gt;
        &lt;/div&gt;
    &lt;?php else: ?&gt;
        &lt;?php $this-&gt;renderPartial('/comment/_form',array(
            'model'=&gt;$data,
        )); ?&gt;
</code></pre>

<p>but now it show an error....
'htmlspecialchars() expects parameter 1 to be string, object given'</p>

<p>my '_form.php' under  'comment' is</p>

<pre><code>&lt;div class="form"&gt;

&lt;?php $form=$this-&gt;beginWidget('CActiveForm', array(
    'id'=&gt;'comment-form',
    'enableAjaxValidation'=&gt;true,
)); ?&gt;

    &lt;p class="note"&gt;Fields with &lt;span class="required"&gt;*&lt;/span&gt; are required.&lt;/p&gt;

    &lt;?php echo $form-&gt;errorSummary($model); ?&gt;

    &lt;div class="row"&gt;
        &lt;?php echo $form-&gt;labelEx($model,'content'); ?&gt;
        &lt;?php echo $form-&gt;textArea($model,'content',array('rows'=&gt;6, 'cols'=&gt;50)); ?&gt;
        &lt;?php echo $form-&gt;error($model,'content'); ?&gt;
    &lt;/div&gt;
&lt;div class="row"&gt;
        &lt;?php echo $form-&gt;labelEx($model,'author'); ?&gt;
        &lt;?php echo $form-&gt;textField($model,'author',array('size'=&gt;60,'maxlength'=&gt;128)); ?&gt;
        &lt;?php echo $form-&gt;error($model,'author'); ?&gt;
    &lt;/div&gt;
</code></pre>
