diff --git a/src/Composer/Util/Git.php b/src/Composer/Util/Git.php index 67d42b7c2600..16d424aac418 100644 --- a/src/Composer/Util/Git.php +++ b/src/Composer/Util/Git.php @@ -336,6 +336,10 @@ private function isAuthenticationFailure($url, &$match) ); $errorOutput = $this->process->getErrorOutput(); + if (null === $errorOutput) { + return false; + } + foreach ($authFailures as $authFailure) { if (strpos($errorOutput, $authFailure) !== false) { return true; diff --git a/src/Composer/Util/ProcessExecutor.php b/src/Composer/Util/ProcessExecutor.php index 7d7e6546eb75..8b6de878a3b4 100644 --- a/src/Composer/Util/ProcessExecutor.php +++ b/src/Composer/Util/ProcessExecutor.php @@ -361,7 +361,7 @@ public function splitLines($output) /** * Get any error output from the last command * - * @return string + * @return ?string */ public function getErrorOutput() {