Raised DBAL version from 1.1.5 to 1.1.6
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Reflection / ObjectAccess.php
index 04749e5..5a4710d 100644 (file)
@@ -32,7 +32,7 @@
  *
  * @package Extbase
  * @subpackage Reflection
- * @version $Id: ObjectAccess.php 2040 2010-03-16 08:32:32Z jocrau $
+ * @version $Id: ObjectAccess.php 2149 2010-03-30 09:28:54Z jocrau $
  */
 class Tx_Extbase_Reflection_ObjectAccess {
 
@@ -91,7 +91,9 @@ class Tx_Extbase_Reflection_ObjectAccess {
        static public function getPropertyPath($subject, $propertyPath) {
                $propertyPathSegments = explode('.', $propertyPath);
                foreach ($propertyPathSegments as $pathSegment) {
-                       if (is_array($subject) || (is_object($subject) && self::isPropertyGettable($subject, $pathSegment))) {
+                       if (is_object($subject) && self::isPropertyGettable($subject, $pathSegment)) {
+                               $subject = self::getProperty($subject, $pathSegment);
+                       } elseif (is_array($subject) && array_key_exists($pathSegment, $subject)) {
                                $subject = self::getProperty($subject, $pathSegment);
                        } else {
                                return NULL;