php error : Creating default object from empty value

i facing some issue when i update my php to 5.4

this issue is PHP error : Creating default object from empty value on my CDbCriteria.

The problem occur by this $criteria->group="…";

example :

$criteria=new CDbCriteria;

$criteria->select=‘balance’;

$criteria->condition="contractID = $contractID";

[color="#FF0000"]$criteria->group="contractID DESC";[/color]

$qAvrecord=Avrecord::model()->findAll($criteria);

Hows this possible $criteria->group=""; as you passing group column statically,

There might be problem when your condition variable $contractID is null.

This error means that you are using an object that is not instantiated… check your code it’s possible that you mistyped the word $criteria on that line and so PHP thinks you are trying to use a new object that is not instantiated… something like $crteria->group instead of $criteria->group

Ya i know the problem finally, "creteria"…Thanks a lot