From: Marc L. <ma...@ma...> - 2006-05-21 19:04:14
|
Hi! Thanks for this. However, I have the feeling this is only masking the symptom. And empty tracker items are still generated in certain cases. Best regards, M ;-) xa...@us... wrote: >Update of /cvsroot/tikiwiki/tiki/lib/cache >In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv18896/lib/cache > >Modified Files: > Tag: BRANCH-1-9 > cachelib.php >Log Message: >avoided warning when files of 0 bytes in cache > >Index: cachelib.php >=================================================================== >RCS file: /cvsroot/tikiwiki/tiki/lib/cache/cachelib.php,v >retrieving revision 1.11.2.2 >retrieving revision 1.11.2.3 >diff -u -d -r1.11.2.2 -r1.11.2.3 >--- cachelib.php 8 Feb 2005 20:43:09 -0000 1.11.2.2 >+++ cachelib.php 18 May 2006 13:53:14 -0000 1.11.2.3 >@@ -43,11 +43,15 @@ > > function getCached($key) { > $key = md5($key); >+ if ( filesize($this->folder."/$key") == 0 ) { // added by Xavi 060518 to bypass warning of cache files of 0 bytes >+ >+ return ´´; >+ } > $fw = fopen($this->folder."/$key","r"); > $data = fread($fw,filesize($this->folder."/$key")); > fclose($fw); > return $data; >- } >+} > > /** gets the timestamp of item insertion in cache, > * returns false if key doesn't exist > > > >------------------------------------------------------- >Using Tomcat but need to do more? Need to support web services, security? >Get stuff done quickly with pre-integrated technology to make your job easier >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >_______________________________________________ >Tikiwiki-cvs mailing list >Tik...@li... >https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs > > -- M ;-) ////////////////////////////////////////////////////////////////// / / / Marc Laporte <|> http://marclaporte.com / / Avantech.net <|> http://avantech.net / / Tiki CMS/Groupware <|> http://tikiwiki.org/UserPagemarclaporte / / / ////////////////////////////////////////////////////////////////// |