"model name" does not have a method named "unsetAttributes"

Dear all,

I have the message “model name” does not have a method named “unsetAttributes” problem when I move the hosting from PHP 5.3 server to PHP 5.2 server. The page requested is an admin page generated from Yii’s auto-generated CRUD feature.

Is there a way to solve this without upgrading the PHP on server? FYI I use Yii 1.1.3

Thanks for your attention.

what is your php error_reporting set at?

Hi, thanks for the reply.

error_reporting(E_ERROR | E_WARNING | E_PARSE)

I think there’s nothing to do with error_reporting, because I use the same source code on PHP 5.3, and it’s worked.

Check one more time that you have Yii 1.1.3 - unsetAttributes() has been added to Yii 1.1.3 - http://www.yiiframework.com/doc/api/CModel#unsetAttributes-detail

Hi, Mdomba

Thanks, but I’ve already use 1.1.3 :)