Re: Found some incompatibilities

messju mohr <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
On Tue, Mar 02, 2004 at 05:07:48PM -0000, Mark Rogers wrote:
> Andreas Streichardt writes:
> > Using php 4.3.5RC3 something like that:
> >
> > $fp=fopen("test.php","r");
> > $super=fread($fp,0);
> > fclose($fp);
> >
> > produces:
> >
> > Warning: fread(): Length parameter must be greater than 0.
> > in /home/mop/super1.php on line 3
> >
> > That's why fread($fp,filesize($config_file)) in the smarty code produces
> some
> > evil warnings using php 4.3.5RC3 in case of empty (0-bytes) configfiles.
> 
> FWIW: I have just come across this with a zero-byte include file:
>     Warning: fread(): Length parameter must be greater than 0.
>     in [...]/Smarty.class.php on line 1734
> 
> Are we taking this to be a PHP bug, or can we fix it? I'm using 4.3.5RC2.
> 
> I've reported this as a PHP bug: http://bugs.php.net/27461 but if this is
> (new) intended behaviour we'll need to "fix" Smarty.

I think we'll fix it if 4.3.5 really ships with that warning on
fread($fp,0).

> -- 
> Mark Rogers,
> More Solutions Ltd :: Tel: 0845 45 89 555

-- 
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.