useless method

Hi,

I think this method should be removed because it is useless and high time consuming @ debug !

I lost about 3 hours to found why the Yii::app->user->getFlash() was empty.

Then i replaced this :




$feedbacks->setAttributes($_POST['Feedbacks']);



by:




$feedbacks->attributes=$_POST['Feedbacks'];



And it worked.

Or i had to keep setAttributes() and add an unset() before refresh() :




if (isset($_POST['Feedbacks'])) {

    $feedbacks->setAttributes($_POST['Feedbacks']);

    ...

    ...

    Yii::app()->user->setFlash('feedback','Your feedback was received, it will be visible once it is approved.');

    unset($_POST);

    $this->refresh();



NOTE: I just edited your post

Please refrain yourself from using "hard" words (***)…

saegeek

setAttributes method does the same as assigning something to attributes. See http://www.yiiframework.com/doc/api/1.1/CComponent/