[+BUGFIX] Extbase (Persistence): Hidden Records in Workspaces now work
authorSebastian Kurfürst <sebastian@typo3.org>
Wed, 12 Jan 2011 05:02:08 +0000 (05:02 +0000)
committerSebastian Kurfürst <sebastian@typo3.org>
Wed, 12 Jan 2011 05:02:08 +0000 (05:02 +0000)
Before, if t3lib_pageSelect::getRecordOverlay returned FALSE (if
no translation is found), a fatal error occured:
PHP Catchable Fatal Error: Argument 2 passed to Tx_Extbase_Persistence_Mapper_DataMapper::getTargetType()
must be an array, boolean given, called in Persistence/Mapper/DataMapper.php

The patch fixes the issue.

Thanks to Michael Voehringer for the bugfix!

Resolves: #8679

typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php

index ced0b0f..aa41892 100644 (file)
@@ -966,7 +966,7 @@ class Tx_Extbase_Persistence_Storage_Typo3DbBackend implements Tx_Extbase_Persis
                                        $row = $this->pageSelectObject->getRecordOverlay($tableName, $row, $languageUid, $overlayMode);
                                }
                        }
-                       if ($row !== NULL) {
+                       if ($row !== NULL && is_array($row)) {
                                $overlayedRows[] = $row;
                        }
                }