From 7f8536711367480facfd00d236422ae2c46c963a Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 7 Jan 2021 23:26:29 +0100 Subject: [PATCH] Make sure an array is always returned --- src/Composer/Downloader/TransportException.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Downloader/TransportException.php b/src/Composer/Downloader/TransportException.php index 73454df81..68c73542f 100644 --- a/src/Composer/Downloader/TransportException.php +++ b/src/Composer/Downloader/TransportException.php @@ -20,7 +20,7 @@ class TransportException extends \RuntimeException protected $headers; protected $response; protected $statusCode; - protected $responseInfo; + protected $responseInfo = array(); public function setHeaders($headers) { @@ -63,7 +63,7 @@ class TransportException extends \RuntimeException /** * @param array $responseInfo */ - public function setResponseInfo($responseInfo) + public function setResponseInfo(array $responseInfo) { $this->responseInfo = $responseInfo; }