Bug #50342
PropertyMapper: Use of interface method before implementation check
Status: | New | Start date: | 2013-07-23 | |
---|---|---|---|---|
Priority: | Could have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | - | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | (any) |
Description
On the following line the PropertyMapper uses a method of the TypeConverterInterface
but performs the actual check for it afterwards:
$targetType = $typeConverter->getTargetTypeForSource($source, $targetType, $configuration); if (!is_object($typeConverter) || !($typeConverter instanceof \TYPO3\Flow\Property\TypeConverterInterface)) { throw new Exception\TypeConverterException('Type converter for "' . $source . '" -> "' . $targetType . '" not found.'); }
Shouldn't the check be performed first and output the original $targetType
on failure?