Hi,
I am getting following error, when i am trying to assign value inside controller like this
Fatal error: Call to undefined function app() in C:\xampp\htdocs\CMS\protected\controllers\SiteController.php
inside sitecontroller :: actionLogin() method first line
Yii:app()->language = 'in';
Anyhelp will be appreciated..
Page 1 of 1
How To Override Config Value From Controller Trying to override language value in sitecontroller
#2
Posted 14 October 2012 - 02:06 AM
change your
as following
Yii:app()->language = 'in';
as following
Yii::app()->language = 'in';
#3
Posted 14 October 2012 - 03:27 AM
alirz23, on 14 October 2012 - 02:06 AM, said:
change your
as following
Yii:app()->language = 'in';
as following
Yii::app()->language = 'in';
Thanks for your quick response.
I could not able to find any difference in both code. Anyway i solved my problem placing the line inside beforeAction method.
Thanks for your valuable time
Share this topic:
Page 1 of 1

Help












