Re: [PHP-DEV] fread($fp, 0);

2004-04-30 Thread Zeev Suraski
The CVS update read: Fixed bug #26752 (Silent unterminated loop when length parameter for fgets(), fread() and fgetss() is 0). (done by Ilia January 2nd this year) I tend to agree that this was a bad idea, and suggest to restore the old check. Unless I'm missing something, bug #26752 wasn't a b

[PHP-DEV] fread($fp, 0);

2004-04-30 Thread Derick Rethans
Hello, what was the rationale behind throwing a warning for the snippet in the topic? Warning: fread(): Length parameter must be greater than 0. in /usr/local/lib/php/PEAR/Common.php on line 1296 This breaks often used code where the filesize is 0, like: $f = fopen('file',