From 77868a5c65ba4f9065c7e8be48e68fafa42529d5 Mon Sep 17 00:00:00 2001 From: Sherakama Date: Wed, 25 Jul 2018 11:23:45 -0700 Subject: [PATCH] Protect against missing result value Fixes error: [ErrorException] Undefined index: errors --- src/PrestissimoFileFetcher.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PrestissimoFileFetcher.php b/src/PrestissimoFileFetcher.php index fe8f4d3..30b7c23 100644 --- a/src/PrestissimoFileFetcher.php +++ b/src/PrestissimoFileFetcher.php @@ -68,7 +68,9 @@ protected function fetchWithPrestissimo($version, $destination, $override) { $result = $multi->getFinishedResults(); $successCnt += $result['successCnt']; $failureCnt += $result['failureCnt']; - $errors += $result['errors']; + if (isset($result['errors'])) { + $errors += $result['errors']; + } if ($this->progress) { foreach ($result['urls'] as $url) { $this->io->writeError(" - Downloading $successCnt/$totalCnt: $url", TRUE);