Hi,
this is my sample code,
public function getIncome($regid){
$commissionbank = new CommissionBank;
$criteria=new CDbCriteria;
$criteria->condition = 'ReceiverID =:regID';
$criteria->params=array(':regID'=>$regid);
$criteria->select = 'sum(DepositeAmount) as amount';
$criteria->group = 'ReceiverID';
$income = $commissionbank->model()->find($criteria);
return $income->amount;
}
this function is working properly before i updated my PHP version , after that when result is Null i am getting error as: " Trying to get property of non-object "
so , what is solution for this problem, the same way i am using in so many function.