CWebApplication.xxxxx not defined

In my .protected/config/main.php I have the following:

return array(

‘basePath’=>dirname(FILE).DIRECTORY_SEPARATOR.’…’,

// Yii::app()->name gets this…

‘name’=>‘Blais Family Ancestry WEB site’,

/********** This is the line causing my exception **************/

‘longname’ => ‘Blais Family Ancestry WEB site - private to specific Blais families’,

/***************************************************************/

‘preload’=>array(‘log’), // preloading ‘log’ component

and I get the following CException message:

Property "CWebApplication.longname" is not defined.

Source File

F:\Apps\Xampp_172\xampp\htdocs\YII\framework\base\CModule.php(435)

I cannot discover why this is. Any help is well appreciated.

Thanks in advance, Gil Blais

You can’t set “longname” because it’s not an attribute of CWebApplication. If you want to store custom stuff, you can use the params array in your config. Example:




...

'params' => array(

   'longname' => 'example',

),

...



In your application you can access the params array like:


echo Yii::app()->params['longname'];