Index: typo3/sysext/opendocs/class.tx_opendocs.php =================================================================== --- typo3/sysext/opendocs/class.tx_opendocs.php (revision 8160) +++ typo3/sysext/opendocs/class.tx_opendocs.php (working copy) @@ -155,37 +155,40 @@ * @return array all recent documents as list-items */ public function renderMenuEntry($document, $md5sum, $isRecentDoc = false, $isFirstDoc = false) { + $entry = ''; $table = $document[3]['table']; $uid = $document[3]['uid']; $record = t3lib_BEfunc::getRecordWSOL($table, $uid); - $label = htmlspecialchars(strip_tags(t3lib_div::htmlspecialchars_decode($document[0]))); - $icon = t3lib_iconWorks::getSpriteIconForRecord($table, $record); - $link = $GLOBALS['BACK_PATH'] . 'alt_doc.php?' . $document[2]; + if (!is_null($record)) { + $label = htmlspecialchars(strip_tags(t3lib_div::htmlspecialchars_decode($document[0]))); + $icon = t3lib_iconWorks::getSpriteIconForRecord($table, $record); + $link = $GLOBALS['BACK_PATH'] . 'alt_doc.php?' . $document[2]; - $firstRow = ''; - if ($isFirstDoc) { - $firstRow = ' first-row'; - } + $firstRow = ''; + if ($isFirstDoc) { + $firstRow = ' first-row'; + } - if (!$isRecentDoc) { - $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.closeDoc', true); + if (!$isRecentDoc) { + $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.closeDoc', true); - // open document - $closeIcon = t3lib_iconWorks::getSpriteIcon('actions-document-close'); + // open document + $closeIcon = t3lib_iconWorks::getSpriteIcon('actions-document-close'); - $entry = ' - - ' . $icon . ' - ' . $label . ' - ' . $closeIcon . ' - '; - } else { - // recently used document - $entry = ' - - ' . $icon . ' - ' . $label . ' - '; + $entry = ' + + ' . $icon . ' + ' . $label . ' + ' . $closeIcon . ' + '; + } else { + // recently used document + $entry = ' + + ' . $icon . ' + ' . $label . ' + '; + } } return $entry;