some code tobe impoved

2008-06-03
2013-04-30
  • edwardpro zhu
    edwardpro zhu
    2008-06-03

    see: rss_cache.inc

    start at line 96:

            if ($filesize = filesize($cache_file) ) {
                $data = fread( $fp, filesize($cache_file));
                $rss = $this->unserialize( $data );
                return $rss;
            }

    it should be better:

            if (($filesize = filesize($cache_file))>0 ) {
                $data = fread( $fp, $filesize );
                $rss = $this->unserialize( $data );
                return $rss;
            }