Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.0.4

Bug #12703 CacheLiteFunction decorator and getLang() issue
Submitted: 2007-12-16 20:25 UTC
From: quipo Assigned: quipo
Status: Closed Package: Translation2 (version 2.0.0RC3)
PHP Version: 5.2.5 OS: irrilevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 8 + 11 = ?

 
 [2007-12-16 20:25 UTC] quipo (Lorenzo Alberton)
Description: ------------ From message AT ptd DOT net: When I use Cache_Lite, this function returns just one letter: 'e' print_r($hdlTranslation->getLang( 'en' ) ); When I comment out these lines in my code: $hdlTranslation =& $hdlTranslation->getDecorator('CacheLiteFunction'); $hdlTranslation->setOption('cacheDir', CACHE_DIR); $hdlTranslation->setOption('lifeTime', 3600*24); // 1 day $hdlTranslation->setOption('fileLocking', false); Then it returns correct values. This is what I have for instantiating Translation2: $arrTr2Params = $GLOBALS['PARAMS']; // defined in !config-cfg.inc.php $arrTr2Params['strings_tables'] = $arrLangs; $hdlTranslation =& Translation2::factory($GLOBALS['tr2_driver'], $hdlDb->hdlDb, $arrTr2Params); $hdlTranslation =& $hdlTranslation->getDecorator('CacheLiteFunction'); $hdlTranslation->setOption('cacheDir', CACHE_DIR); $hdlTranslation->setOption('lifeTime', 3600*24); // 1 day $hdlTranslation->setOption('fileLocking', false); I think something is wrong with Cache_Lite decorator functions.

Comments

 [2007-12-16 20:27 UTC] quipo (Lorenzo Alberton)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.