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);
kiran123
(Sharmakiran71)
July 24, 2012, 7:08am
2
Hows this possible $criteria->group=""; as you passing group column statically,
There might be problem when your condition variable $contractID is null.
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);
mdomba
(Maurizio Domba Cerin)
July 24, 2012, 9:28am
3
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