[+BUGFIX] Extbase (Persistence): DataMapper now mapps NULL into a property on non...
authorFelix Oertel <typo3@foertel.com>
Wed, 21 Jul 2010 13:53:11 +0000 (13:53 +0000)
committerFelix Oertel <typo3@foertel.com>
Wed, 21 Jul 2010 13:53:11 +0000 (13:53 +0000)
typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php

index 693b9cb..5cd9bd8 100644 (file)
@@ -448,7 +448,12 @@ class Tx_Extbase_Persistence_Mapper_DataMapper implements t3lib_Singleton {
                                }
                        } elseif (strpos($propertyMetaData['type'], '_') !== FALSE) {
                                if (is_array($result)) {
-                                       $propertyValue = current($result);
+                                       
+                                       if (current($result) !== FALSE) {
+                                               $propertyValue = current($result);
+                                       } else {
+                                               $propertyValue = NULL;
+                                       }
                                } else {
                                        $propertyValue = $result;
                                }