Property Is Not Defined Error Comes

i am having a Model called Activity, in that have the search() defined as below. but i cant think why when i call it this way this error prompts up…

Internal Server Error

Property "" is not defined.

Calling way…

//Get data

  $model = new $modelName();

  if ($modelName === "Activity")

     $criteria = $model->search();


     $criteria = unserialize(base64_decode($criteria));

    $rows = $model->commandBuilder->createFindCommand($model->tableSchema, $criteria)->queryAll();

what am i doing wrong here ? can anybody pls help me fix this

    public function search() {

          $criteria = new CDbCriteria();

          $criteria->select = ',t.activity_id,t.type,t.sub_type,,t.description,t.source,t.delete_req,t.delete_reason, as session_id, s.site_id, 

          s.location, s.start_time, s.end_time, as Participants as s.closed, c.first_name, j.attended, c.managed_by_id';

          $criteria->join = 'left join activity_sessions s on = s.activities_id 

             left join activity_jobseekers j on = j.session_id

             left join contacts c on j.contact_id =';

          // Case insensitive compare

          if (!empty($this->activity_id))

             $criteria->addSearchCondition("t.activity_id", $this->activity_id.'%', false, 'AND', 'ILIKE');

          if (!empty($this->type))

             $criteria->addSearchCondition("t.type", $this->type.'%', false, 'AND', 'ILIKE');

          if (!empty($this->sub_type))

             $criteria->addSearchCondition("t.sub_type", $this->sub_type.'%', false, 'AND', 'ILIKE');

          if (!empty($this->name))

             $criteria->addSearchCondition("", $this->name.'%', false, 'AND', 'ILIKE');

          if (!empty($this->description))

             $criteria->addSearchCondition("t.description", $this->description.'%', false, 'AND', 'ILIKE');

          if ($this->source !== null)

             $criteria->compare('t.source', $this->source, false);




          return new CActiveDataProvider('Activity', array(


             'sort'=>array('defaultOrder'=>' ASC'),




U should return the CDbCriteria object rather than returning CActiveDataProvider provider object in search method…

hope this helps…

Thanks a lot. u saved my day!