[BUGFIX] ClassLoader not working with NullBackend for legacy classes 18/27218/2
authorDaniel Siepmann <daniel.siepmann@typo3.org>
Fri, 31 Jan 2014 20:14:54 +0000 (21:14 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 31 Jan 2014 21:03:47 +0000 (22:03 +0100)
Removed unused line that creates a fatal error.
Implemented eval in case NullBackend is set for “cache_core”
and no alias mapping is included.

Resolves: #55517
Releases: 6.2
Change-Id: Ie1d58985496c4561d8b20fedbd030ad98760becd
Reviewed-on: https://review.typo3.org/27218
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Core/ClassAliasMap.php
typo3/sysext/core/Classes/Package/PackageManager.php

index 1e2ef2e..05bdac1 100644 (file)
@@ -217,7 +217,10 @@ class ClassAliasMap implements \TYPO3\CMS\Core\SingletonInterface {
                        $cacheEntryIdentifier = $this->getCacheEntryIdentifier();
                        if ($cacheEntryIdentifier !== NULL) {
                                $this->coreCache->set($this->getCacheEntryIdentifier(), implode(LF, $proxyContent));
-                               $this->coreCache->requireOnce($cacheEntryIdentifier);
+                               if ($this->coreCache->requireOnce($cacheEntryIdentifier) === NULL) {
+                                       // Just happens on TYPO3\CMS\Core\Cache\Backend\NullBackend, cause we don't get a return value.
+                                       eval(implode(PHP_EOL, $proxyContent));
+                               }
                        } else {
                                eval(implode(PHP_EOL, $proxyContent));
                        }
index e22d883..7b2d08b 100644 (file)
@@ -189,7 +189,6 @@ class PackageManager extends \TYPO3\Flow\Package\PackageManager implements \TYPO
        protected function saveToPackageCache() {
                $cacheEntryIdentifier = $this->getCacheEntryIdentifier();
                if ($cacheEntryIdentifier !== NULL && !$this->coreCache->has($cacheEntryIdentifier)) {
-                       $cacheEntryPath = rtrim(\TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($this->coreCache->getBackend()->getCacheDirectory()), '/');
                        // Package objects get their own cache entry, so PHP does not have to parse the serialized string
                        $packageObjectsCacheEntryIdentifier = uniqid('PackageObjects_');
                        // Build cache file