[BUGFIX] Download documentation for extension in documentation module 80/37980/2
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Fri, 20 Mar 2015 20:28:58 +0000 (21:28 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Sat, 21 Mar 2015 10:22:28 +0000 (11:22 +0100)
Fix the warning when trying to download documentation
for extension in TYPO3 7.2

Resolves: #65877
Releases: master
Change-Id: I98624eb8f0bd5bddd5390151f9cb09b86f6b279e
Reviewed-on: http://review.typo3.org/37980
Reviewed-by: Peter Kraume <peter.kraume@gmx.de>
Tested-by: Peter Kraume <peter.kraume@gmx.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/documentation/Classes/Service/DocumentationService.php

index 5fcbcb0..b8fa141 100644 (file)
@@ -115,11 +115,13 @@ class DocumentationService {
                                // Fetch next language
                                continue;
                        } else {
-                               foreach ($packages[$version] as $locale => $_) {
-                                       if (GeneralUtility::isFirstPartOfStr($locale, $language)) {
-                                               $success |= $this->fetchDocument($url, $key, $version, $locale);
-                                               // Fetch next language (jump current foreach up to the loop of $languages)
-                                               continue 2;
+                               if (isset($packages[$version])) {
+                                       foreach ($packages[$version] as $locale => $_) {
+                                               if (GeneralUtility::isFirstPartOfStr($locale, $language)) {
+                                                       $success |= $this->fetchDocument($url, $key, $version, $locale);
+                                                       // Fetch next language (jump current foreach up to the loop of $languages)
+                                                       continue 2;
+                                               }
                                        }
                                }
                        }