[-TASK] Extbase (Persistence): Removed unnecessary classes, code and empty interfaces.
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / MVC / Controller / Argument.php
index ff4cae2..6fb2709 100644 (file)
@@ -142,7 +142,7 @@ class Tx_Extbase_MVC_Controller_Argument {
                $this->reflectionService = t3lib_div::makeInstance('Tx_Extbase_Reflection_Service');
                $this->propertyMapper = t3lib_div::makeInstance('Tx_Extbase_Property_Mapper');
                $this->propertyMapper->injectReflectionService($this->reflectionService);
-               $this->dataTypeClassSchema = $this->reflectionService->getClassSchema($this->dataType);
+               $this->dataTypeClassSchema = (strstr($this->dataType, '_') !== FALSE) ? $this->reflectionService->getClassSchema($this->dataType) : NULL;
        }
 
        /**
@@ -364,11 +364,7 @@ class Tx_Extbase_MVC_Controller_Argument {
                }
 
                if (!($transformedValue instanceof $this->dataType)) {
-                       if (is_object($transformedValue)) {
-                               throw new Tx_Extbase_MVC_Exception_InvalidArgumentValue('The value must be of type "' . $this->dataType . '", but was of type "' . get_class($transformedValue) . '".', 1251730701);
-                       } else {
-                               throw new Tx_Extbase_MVC_Exception_InvalidArgumentValue('The value must be of type "' . $this->dataType . '", but was of type "' . gettype($transformedValue) . '".', 1251730702);
-                       }
+                       throw new Tx_Extbase_MVC_Exception_InvalidArgumentValue('The value must be of type "' . $this->dataType . '", but was of type "' . (is_object($transformedValue) ? get_class($transformedValue) : gettype($transformedValue)) . '".', 1251730701);
                }
                return $transformedValue;
        }
@@ -381,6 +377,7 @@ class Tx_Extbase_MVC_Controller_Argument {
         */
        protected function findObjectByUid($uid) {
                $query = $this->queryFactory->create($this->dataType);
+               $query->getQuerySettings()->setRespectSysLanguage(FALSE);
                $result = $query->matching($query->withUid($uid))->execute();
                $object = NULL;
                if (count($result) > 0) {