[~TASK] Extbase (Property): Small refactoring.
authorJochen Rau <j.rau@web.de>
Wed, 21 Apr 2010 12:33:36 +0000 (12:33 +0000)
committerJochen Rau <j.rau@web.de>
Wed, 21 Apr 2010 12:33:36 +0000 (12:33 +0000)
typo3/sysext/extbase/Classes/Property/Mapper.php

index 5a31bc5..ad84b51 100644 (file)
@@ -245,7 +245,7 @@ class Tx_Extbase_Property_Mapper {
         * @return object The object, when no transformation was possible this may return NULL as well
         */
        protected function transformToObject($propertyValue, $targetType, $propertyName) {
-               if ($targetType === 'DateTime' || in_array('DateTime', class_parents($targetType)) ) {
+               if ($targetType === 'DateTime' || is_subclass_of($targetType, 'DateTime')) {
                        // TODO replace this with converter implementation of FLOW3
                        if ($propertyValue === '') {
                                $propertyValue = NULL;