Prechádzať zdrojové kódy

Use original URL for exceptions, not the one containing authorization, fixes #1722

Jordi Boggiano 12 rokov pred
rodič
commit
842155d69e
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      src/Composer/Util/RemoteFilesystem.php

+ 2 - 2
src/Composer/Util/RemoteFilesystem.php

@@ -178,7 +178,7 @@ class RemoteFilesystem
             $result = (bool) file_put_contents($fileName, $result);
             $result = (bool) file_put_contents($fileName, $result);
             restore_error_handler();
             restore_error_handler();
             if (false === $result) {
             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) {
         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])) {
             if (!empty($http_response_header[0])) {
                 $e->setHeaders($http_response_header);
                 $e->setHeaders($http_response_header);
             }
             }