From 831b001b322bc084c5114ec1102116421b38452e Mon Sep 17 00:00:00 2001
From: Eddie Lau <kahlau@magento.com>
Date: Mon, 14 Mar 2016 14:35:14 -0500
Subject: [PATCH] MAGETWO-50081: [Github][PR] Fix direct file deletion by
 MarketplaceManager #3095

- added checking for first index
---
 setup/src/Magento/Setup/Model/MarketplaceManager.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup/src/Magento/Setup/Model/MarketplaceManager.php b/setup/src/Magento/Setup/Model/MarketplaceManager.php
index cf80db1f0d0..0cc680f3c0c 100644
--- a/setup/src/Magento/Setup/Model/MarketplaceManager.php
+++ b/setup/src/Magento/Setup/Model/MarketplaceManager.php
@@ -269,7 +269,7 @@ class MarketplaceManager
         if ($directory->isExist($this->pathToAuthFile) && $directory->isReadable($this->pathToAuthFile)) {
             try {
                 $authJsonData = $this->getAuthJson();
-                if (isset($authJsonData['http-basic'][$serviceUrl])) {
+                if (isset($authJsonData['http-basic']) && isset($authJsonData['http-basic'][$serviceUrl])) {
                     unset($authJsonData['http-basic'][$serviceUrl]);
                     $path = DirectoryList::COMPOSER_HOME . DIRECTORY_SEPARATOR . $this->pathToAuthFile;
                     if ($authJsonData === ['http-basic' => []]) {
-- 
GitLab