[BUGFIX] Invalid class name to file path conversion
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Core / ClassLoader.php
index 0c2d841..7ac6c6d 100644 (file)
@@ -333,7 +333,9 @@ class ClassLoader {
                        } else {
                                $classesPath = $this->packageClassesPaths[$extensionKey];
                        }
-                       $classFilePath = $classesPath . strtr($classNameWithoutVendorAndProduct, $delimiter, '/') . '.php';
+                       // Naming convention is to capitalize each part of the path
+                       $classNameWithoutVendorAndProduct = ucwords(strtr($classNameWithoutVendorAndProduct, $delimiter, LF));
+                       $classFilePath = $classesPath . strtr($classNameWithoutVendorAndProduct, LF, '/') . '.php';
                        if (@file_exists($classFilePath)) {
                                return array($classFilePath, $className);
                        }