Fixed bug in convertPropertyValueToFieldValue
authorChristopher Hlubek <hlubek@networkteam.com>
Thu, 26 Mar 2009 15:38:40 +0000 (15:38 +0000)
committerChristopher Hlubek <hlubek@networkteam.com>
Thu, 26 Mar 2009 15:38:40 +0000 (15:38 +0000)
typo3/sysext/extbase/Classes/Persistence/Mapper/DataMap.php

index 83d05ec..887cf7a 100644 (file)
@@ -253,9 +253,9 @@ class Tx_ExtBase_Persistence_Mapper_DataMap {
         * @return mixed The converted value
         */
        public function convertPropertyValueToFieldValue($propertyValue, $fullQuoteString = TRUE) {
-               if (is_bool($value)) {
+               if (is_bool($propertyValue)) {
                        $convertedValue = $propertyValue ? 1 : 0;
-               } elseif ($value instanceof Tx_ExtBase_DomainObject_AbstractDomainObject) {
+               } elseif ($propertyValue instanceof Tx_ExtBase_DomainObject_AbstractDomainObject) {
                        $convertedValue = $propertyValue->getUid();
                } elseif ($propertyValue instanceof DateTime) {
                        $convertedValue = $propertyValue->format('U');