fread($fp, 0);

From: Date: Fri, 30 Apr 2004 20:18:14 +0000
Subject: fread($fp, 0);
Groups: php.internals 
Request: Send a blank email to internals+get-9620@lists.php.net to get a copy of this message
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', 'r'); $contents = fread($f, filesize('file')); And I don't really see the point of throwing a warning here. Derick

« previous php.internals (#9620) next »