Re: [SMARTY-DEV] Found some incompatibilities

From: Date: Tue, 02 Mar 2004 17:07:48 +0000
Subject: Re: [SMARTY-DEV] Found some incompatibilities
References: 1 2 3  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2170@lists.php.net to get a copy of this message
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. -- Mark Rogers, More Solutions Ltd :: Tel: 0845 45 89 555

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