Fixed bug #15082: [openDocs] Exception is thrown if a record isn't found
authorSteffen Kamper <info@sk-typo3.de>
Mon, 12 Jul 2010 19:46:51 +0000 (19:46 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Mon, 12 Jul 2010 19:46:51 +0000 (19:46 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8165 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/opendocs/class.tx_opendocs.php

index 15314c0..401529d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-12  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #15082: [openDocs] Exception is thrown if a record isn't found
+
 2010-07-12  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Fixed bug #1235: indexed search: garbage instead of cHash in the "path" link (thanks to Nikolas Hagestein)
index 860e35d..fffeade 100644 (file)
@@ -158,6 +158,10 @@ class tx_opendocs implements backend_toolbarItem {
                $table  = $document[3]['table'];
                $uid    = $document[3]['uid'];
                $record = t3lib_BEfunc::getRecordWSOL($table, $uid);
+               if (!is_array($record)) {
+                               // record seems to be deleted
+                       return '';
+               }
                $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];