Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55886 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44912 invoked from network); 21 Oct 2011 19:40:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Oct 2011 19:40:14 -0000 Authentication-Results: pb1.pair.com header.from=tom@punkave.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tom@punkave.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain punkave.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: tom@punkave.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:41900] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/53-22928-D9AC1AE4 for ; Fri, 21 Oct 2011 15:40:14 -0400 Received: by vcbfl10 with SMTP id fl10so4039779vcb.29 for ; Fri, 21 Oct 2011 12:40:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.153.135 with SMTP id k7mr1156008vcw.55.1319226008515; Fri, 21 Oct 2011 12:40:08 -0700 (PDT) Received: by 10.220.192.9 with HTTP; Fri, 21 Oct 2011 12:40:08 -0700 (PDT) Date: Fri, 21 Oct 2011 15:40:08 -0400 Message-ID: To: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: fclose(), file_put_contents(), copy() all fail to return false on error From: tom@punkave.com (Tom Boutell) It appears that all three of these functions do not return false on error as they should if the stream is not flushed successfully. Yipes! https://bugs.php.net/bug.php?id=60110 Am I missing something here? It's especially bad with, say, an S3 stream wrapper that wants to write the whole thing as one HTTP request, but it could bite you with plain old files too. -- Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com