[BUGFIX] Catch possible NULL values to avoid exception 88/36788/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Tue, 10 Feb 2015 08:16:34 +0000 (09:16 +0100)
committerAlexander Opitz <opitz.alexander@googlemail.com>
Tue, 10 Feb 2015 10:41:42 +0000 (11:41 +0100)
If references are not maintained properly, all reference information
may be NULL or empty string (depending on it's type). Catch NULL values
and return early.

Resolves: #64955
Releases: master, 6.2
Change-Id: Id525e011f7b70190bc8f1f0c27e8c4b091325304
Reviewed-on: http://review.typo3.org/36788
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php

index 53a1428..468bb0a 100644 (file)
@@ -527,6 +527,9 @@ class ElementInformationController {
                foreach ($rows as $row) {
                        if ($row['tablename'] === 'sys_file_reference') {
                                $row = $this->transformFileReferenceToRecordReference($row);
+                               if ($row['tablename'] === NULL || $row['recuid'] === NULL) {
+                                       return '';
+                               }
                        }
                        $record = BackendUtility::getRecord($row['tablename'], $row['recuid']);
                        $parentRecord = BackendUtility::getRecord('pages', $record['pid']);