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  


 [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] gurugeek
Dear Maintainer, Your package html_template_xipe has currently 3 open bugs. We urge you to take the necessary steps to solve the reported issues at your soonest convenience. If the bug issue hasn’t been addressed yet you are kindly asked to take the necessary steps to ensure a prompt resolution of the problem. If you already addressed the reported problem feel free to change the bug status as soon as possible. Regards David Costa PEAR Quality Assurance pear-qa@lists.php.net
 [2006-04-24 21:16 UTC] arnaud (Arnaud Limbourg)
Package unmaintained.