[Typo3-dev] custom object in session problem

Fabian Künzler fabian.kuenzler at basis06.com
Wed Aug 18 16:39:42 CEST 2004


in my extension i try to write an object to the session. but when i try
to get the object out from the session it fails:

        // check if basket is already in session
        if($GLOBALS['TSFE']->fe_user->getKey('ses','keyBasket')) {
            // get basket form session
            $aBasket = $GLOBALS['TSFE']->fe_user->getKey('ses','keyBasket');
        } else {
            // create new basket';
            $aBasket = new Basket();
            //$GLOBALS['TSFE']->fe_user->getKey('ses','getkeyBasket');
        }
        $aBasket->addItemUid($uid);

        // write updated basket to session
        $GLOBALS['TSFE']->fe_user->setKey('ses','keyBasket', $aBasket);

this causes the following error:
 ...
__PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] => basket
[_arrItems] => )
...

so i think the solution would be to include the class "class.basket.php" in
a different file then in the
plugin file "class.tx_infoshop_pi1.php"

BUT WHERE????

thanks fabian







More information about the TYPO3-dev mailing list