From 4d92626ef0f68cce85caf948021fe3ab7c4a6827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Hochd=C3=B6rfer?= Date: Tue, 30 Apr 2013 22:39:08 +0200 Subject: [PATCH] Fix for recursion problem with wrong http basic auth credentials. First I got an "array_replace_recursive(): Argument #2 is not an array" error and after fixing that it resulted in another error saying "Undefined variable: result". --- src/Composer/Util/RemoteFilesystem.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index 2322e193f..8b4c4a0dc 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -112,6 +112,7 @@ class RemoteFilesystem $errorMessage = ''; $errorCode = 0; + $result = false; set_error_handler(function ($code, $msg) use (&$errorMessage) { if ($errorMessage) { $errorMessage .= "\n"; @@ -188,7 +189,7 @@ class RemoteFilesystem if ($this->retry) { $this->retry = false; - return $this->get($this->originUrl, $this->fileUrl, $this->fileName, $this->progress); + return $this->get($this->originUrl, $this->fileUrl, $additionalOptions, $this->fileName, $this->progress); } if (false === $result) {