Re: Found some incompatibilities

Andreas Streichardt <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Organization Globalpark GmbH
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 19 February 2004 00:13, messju mohr wrote:
> On Wed, Feb 18, 2004 at 11:51:21AM +0100, Andreas Streichardt wrote:

Hi,

> > Furthermore our config file had a size of 0 bytes...the behaviour of
> > fread seems to have changed since 4.2.2...i "fixed" that too...
>
> Can you elaborate? I didn't encounter any problems with a
> 0-bytes-config-file and php-4.3.4 for example.

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.

> greetings
> messju

Regards,

 	Andreas Streichardt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQFANHd+Wy5LAOeI9r4RAn5CAJ9cSjlt/NjS+pNWdNpeS/a884pY6gCfbiJT
hTxpp1mCLptziJFbK/Ye7bM=
=T+2c
-----END PGP SIGNATURE-----

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