From ce08b2fc4f68de4e030f140274938d2becb92335 Mon Sep 17 00:00:00 2001 From: Beau Simensen Date: Wed, 14 Mar 2012 15:40:51 -0700 Subject: [PATCH] Fix HTTPS through Proxy errors. --- src/Composer/Util/RemoteFilesystem.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index 87d725037..57719cbf4 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -102,10 +102,9 @@ class RemoteFilesystem $this->io->write(" Downloading: connection...", false); } + $result = @file_get_contents($fileUrl, false, $ctx); if (null !== $fileName) { - $result = @copy($fileUrl, $fileName, $ctx); - } else { - $result = @file_get_contents($fileUrl, false, $ctx); + $result = @file_put_contents($fileName, $result) ? true : false; } // fix for 5.4.0 https://bugs.php.net/bug.php?id=61336