Re: Found some incompatibilities
boots <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
--- Mark Rogers <[email protected]> wrote: > 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. Yes, of course. That's what I intended to convey: It wasn't the best possible practice, but considering the tools, it was completely satisfactory and efficient. > 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. I tend to agree with messju's earlier comment--freed should fail on a 0 byte request and hence should be fixed. Still, there was no real problem with failing silently as it has done historically. There is no harm in returning 0 bytes, generally, even if it is an inefficient way to produce a 0-length string) particularly true as I tend to think that BC issues are indeed important. Still, it is not a show stopper for Smarty by any means (particularly since it is easy to fix) and it isn't even official yet anyhow. xo boots __________________________________ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com -- Smarty Development Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php