Re: [SMARTY-DEV] Found some incompatibilities

From: Date: Tue, 02 Mar 2004 18:53:41 +0000
Subject: Re: [SMARTY-DEV] Found some incompatibilities
References: 1 2 3 4  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2171@lists.php.net to get a copy of this message
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

« previous php.smarty.dev (#2171) next »