From 842155d69e9e0f07e1c92df7fdbe484dc4433ec8 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 23 Mar 2013 19:43:08 +0100 Subject: [PATCH] Use original URL for exceptions, not the one containing authorization, fixes #1722 --- src/Composer/Util/RemoteFilesystem.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index 79efd3298..0a54c5285 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -178,7 +178,7 @@ class RemoteFilesystem $result = (bool) file_put_contents($fileName, $result); restore_error_handler(); if (false === $result) { - throw new TransportException('The "'.$fileUrl.'" file could not be written to '.$fileName.': '.$errorMessage); + throw new TransportException('The "'.$this->fileUrl.'" file could not be written to '.$fileName.': '.$errorMessage); } } @@ -188,7 +188,7 @@ class RemoteFilesystem } if (false === $this->result) { - $e = new TransportException('The "'.$fileUrl.'" file could not be downloaded: '.$errorMessage, $errorCode); + $e = new TransportException('The "'.$this->fileUrl.'" file could not be downloaded: '.$errorMessage, $errorCode); if (!empty($http_response_header[0])) { $e->setHeaders($http_response_header); }