From fc6bf4ceecb5d47327f54d48d4d4f67b17da956d Mon Sep 17 00:00:00 2001 From: Sherakama Date: Fri, 27 Jul 2018 03:07:07 -0700 Subject: [PATCH] Protect against missing result value (#91) --- 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);