[TASK] Make Flow Package HHVM compatible 08/29508/3
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Wed, 16 Apr 2014 14:54:19 +0000 (16:54 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 2 May 2014 19:51:29 +0000 (21:51 +0200)
HHVM doesn't support calling array functions like key()
on objects, we need to cast object to array first.

Resolves: #57993
Related: #57992
Releases: 6.2
Change-Id: I8551860b103745622624dafd8f285db1a7b8f275
Reviewed-on: https://review.typo3.org/29508
Reviewed-by: Stefan Neufeind
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/core/Resources/PHP/TYPO3.Flow/Classes/TYPO3/Flow/Package/Package.php

index e293a48..6a637e2 100644 (file)
@@ -214,7 +214,7 @@ class Package implements PackageInterface {
                if (!$this->namespace) {
                        $manifest = $this->getComposerManifest();
                        if (isset($manifest->autoload->{'psr-0'})) {
-                               $namespaces = $manifest->autoload->{'psr-0'};
+                               $namespaces = (array)$manifest->autoload->{'psr-0'};
                                if (count($namespaces) === 1) {
                                        $namespace = key($namespaces);
                                } else {