I have a website in Yii. It was working perfectly. But, when I upgrade MySql I suffer from some errors.
1.) date():
It is not safe to rely on the system's timezone settings.
But I have solved it by defining timezone.
2.) Undefined index: Registration.
I cant solve it. so, What do I do? My code is as below:
public function actionIndex() {
$model = new Supplier('search');
$model1 = new Registration('search');
$model->unsetAttributes();
$model1->unsetAttributes();
if (isset($_REQUEST['Supplier'] , $_REQUEST['Registration']))
$model->setAttributes($_REQUEST['Supplier']);
$model1->setAttributes($_REQUEST['Registration']); // here is the error.
$this->render('admin', array(
'model' => $model,
'model1' => $model1,
));
}
Here, If I define $_REQUEST['Registration']
in my URL then it will work but, I cant do that because it is everywhere in my site. And error occurs after upgrade Mysql. So, What should I do?
Thanks,