Re: [PATCH] use file_get_contents instead fread($fp, filesize($filename))

messju mohr <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
On Tue, Jul 06, 2004 at 11:26:45PM +0400, Antony Dovgal wrote:
> On Tue, 6 Jul 2004 10:00:21 -0700 (PDT)
> boots <[email protected]> wrote:
> 
> > --- Antony Dovgal <[email protected]> wrote:
> > > Regardless of the fact that this bug will be fixed (I hope), this
> > > fopen-fread-filesize-fclose mess can be safely replaced by one
> > > file_get_contents() calls.
> > > 
> > > Please, review it.
> > 
> > I think this has been discussed (?). A problem with file_get_contents
> > is that it would increase the requirements of Smarty to PHP >= 4.3
> 
> aha, I got it. 
> so maybe it worth to make some other workaround for it?
> something like:
> 
> $contents = '';
> while ($buf = fread($fp, 4096)) $contents .= $buf;
> ?
> 
> I'm not sure if this bug will be fixed and just want to make a
> workaround before the real problem appears ('cos it already appeared
> for me).

the bug is just 2 days old. i'd wait till it gets a "bogus" or
"wontfix" status before i take any measures for smarty.

and i'd be really shock if this bug doesn't get fixed and this
incompatibility goes into php5.

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.