[BUGFIX] Retrieving extension fails with some PHP versions 83/29783/3
authorSascha Wilking <sascha.wilking@hmmh.de>
Fri, 2 May 2014 17:49:10 +0000 (19:49 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 2 May 2014 19:07:32 +0000 (21:07 +0200)
XmlParser has an issue with PHP < 5.4.28 leading to
unexpected empty arrays raising warnings. If development
preset is activated, warnings are turned into exceptions,
so the extension list parser stops importing.

Resolves: #58418
Releases: 6.2, 6.1
Change-Id: Idc6453bd8dcc46a933a1d6d72361ffff5842e39d
Reviewed-on: https://review.typo3.org/29783
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/extensionmanager/Classes/Utility/Parser/AbstractExtensionXmlParser.php

index 9471342..3def0ce 100644 (file)
@@ -407,7 +407,9 @@ abstract class AbstractExtensionXmlParser extends AbstractXmlParser {
                $dependenciesArray = unserialize($dependencies);
                if (is_array($dependenciesArray)) {
                        foreach ($dependenciesArray as $version) {
-                               $newDependencies[$version['kind']][$version['extensionKey']] = $version['versionRange'];
+                               if (!empty($version['kind']) && !empty($version['extensionKey'])) {
+                                       $newDependencies[$version['kind']][$version['extensionKey']] = $version['versionRange'];
+                               }
                        }
                }
                return serialize($newDependencies);