Hi!

I am using this component:

class P28nComponent extends Object {
    var $components = array('Session');

   function startup() {
        if (!$this->Session->check('Config.language')) {
            $this->change(DEFAULT_LANGUAGE);
        }
    }

   function change($lang = null) {
        if (!empty($lang)) {
            $this->Session->write('Config.language', $lang);
            $this->Session->write('Config.languageID',
Configure::read('lngId.'.$lang));
            return true;
        }
    }

and getting this error:

Warning (2): call_user_func_array() expects parameter 1 to be a valid
callback, class 'P28nComponent' does not have a method 'initialize'

Notice (8): Undefined property: P28nComponent::$Session

Fatal error: Call to a member function check() on a non-object

I checked the book but for some reason I don't understand what exactly
I have to do.

Please help!!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to