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

Bug #265 cache with HTML_Template_Xipe doesnt work in functions
Submitted: 2003-11-18 02:46 UTC
From: konrek at gmx dot net Assigned: cain
Status: Suspended Package: HTML_Template_Xipe
PHP Version: Irrelevant OS: linux, PHP 4.2
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 : 9 - 8 = ?

 
 [2003-11-18 02:46 UTC] konrek at gmx dot net
Description: ------------ calling include() in fct causes error (works in global scope): Fatal error: Call to a member function on a non-object in /home/kostja00/public_html/docserv/browsing/test/tmp/ template_test.tpl.en.php on line 12 line 12: <?php $_2f9c40105e256a4b38ac6ca4b2810af2->_cacheEnd() ?> Reproduce code: --------------- function tpl() { global $tpl; $options = array( 'templateDir' => dirname( __FILE__ ), 'enable-Cache'=> TRUE , 'debug' => 1, 'filterLevel' => 8, 'forceCompile' => TRUE, 'enable-XMLConfig' => true ); /* 'autoBraces' => false */ $tpl = new HTML_Template_Xipe( $options ); if ( !$tpl->isCached('include.tpl' )) { print 'CACHE MISS, GENERATING CACHE FILE NOW!'; } $tpl->compile( 'include.tpl' ); include( $tpl->getCompiledTemplate() ); $tpl->compile( 'template_test.tpl' ); include( $tpl->getCompiledTemplate() ); trigger_error('This is an information log message.', E_USER_NOTICE); $tpl->compile( 'include_end.tpl' ); include( $tpl->getCompiledTemplate() ); }// end function tpl(); //--------------------------------- template-test.php: <HTML_Template_Xipe> <options> <cache> <time value="10" /> </cache> </options> </HTML_Template_Xipe> <!-- { include_once('include.tpl')} funktioniert auch--> some links more more cache-time {foreach( $list as $l ) } <li>{$l}</li> <br /> {%trim $text 5 "..."%} <br /> {%repeat 3%} repeat me

Comments

 [2003-11-19 12:12 UTC] konrek at gmx dot net
Fixed the bug, in Cache.php set Cache._enableCaching() the the cache-object-call wich appears at the very end of templates <?php } $_e3423(somemd5some)->_cacheEnd() ?> to <?php } $GLOBALS["_e3423(somemd5some)"]->_cacheEnd() ?>
 [2004-07-11 22:14 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-04-24 21:16 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!