Php Fatal Error. Why I Am Getting This Error?

I created a dropDownList with values I get from a model I created. In my OptionRecord model, I have this code




public function getProposedMode(){

		return array(

		'Public Bidding',

		'Direct Contracting',

		'Shopping',

		'Negotiated',

		'Small Value',

		);

}



In my controller, I add the ff. lines on my actionCreate




public function actionCreate()

	{


		$options = new OptionRecord();

		$model=new PurchaseRequest;


		// Uncomment the following line if AJAX validation is needed

		// $this->performAjaxValidation($model);


		if(isset($_POST['PurchaseRequest']))

		{

			$model->attributes=$_POST['PurchaseRequest'];

			$model->proposed_mode = $options->getProposedModeatIndex($model->proposed_mode);

			if($model->save()){

				$this->redirect(array('view','id'=>$model->id));

			}

		}

		$model->proposed_mode = $options->getProposedModeIndex($model->proposed_mode);


		$this->render('create',array(

			'model'=>$model,

		));

	}



Where did I go wrong? please help. thank you.

Because on one line you have

getProposedModeatIndex

on another

getProposedModeIndex

the method you posted is called

getProposedMode

and it doesnt take params btw

Basically, the answer is: you’re getting this error because of being inattentive.