Re: [SMARTY-DEV] Found some incompatibilities
| From: | Mark Rogers | Date: | Wed, 03 Mar 2004 10:01:21 +0000 |
| Subject: | Re: [SMARTY-DEV] Found some incompatibilities | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2179@lists.php.net to get a copy of this message | ||
Boots writes:
> Agreed, which indicates that it was either sloppy
> to request 0 bytes in the first place or more likely
> just a convenience considering the historical
> behaviour of fread.
The PHP manual shows an example which uses filesize exactly as Smarty does;
not that that makes it "good programming" but it does make it quite common.
If you Google for the phrase "Warning: fread(): Length parameter must be
greater than 0" there seem to be a number of sites out there using similar
code who have presumably upgraded PHP without realising, so I'm inclined to
think that this should not have been "fixed" in PHP, but since it has we
need Smarty ready to work with it.
--
Mark Rogers,
More Solutions Ltd :: Tel: 0845 45 89 555