Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9620 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74641 invoked by uid 1010); 30 Apr 2004 20:18:15 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 74617 invoked from network); 30 Apr 2004 20:18:15 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 30 Apr 2004 20:18:15 -0000 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.10/8.12.10) with ESMTP id i3UKIEbc025649 for ; Fri, 30 Apr 2004 22:18:14 +0200 Date: Fri, 30 Apr 2004 22:18:14 +0200 (CEST) X-X-Sender: derick@localhost To: PHP Developers Mailing List Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: fread($fp, 0); From: derick@php.net (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', 'r'); $contents = fread($f, filesize('file')); And I don't really see the point of throwing a warning here. Derick