[BUGFIX] Prevent fatal on missing permissions in EditDocumentController 52/44152/3
authorMathias Schreiber <mathias.schreiber@wmdb.de>
Mon, 19 Oct 2015 11:39:22 +0000 (13:39 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Mon, 19 Oct 2015 13:03:47 +0000 (15:03 +0200)
Sending a user into EditDocumentController with insufficient permissions
results in a fatal error. We wrap-catch it now.

Resolves: #70841
Releases: master
Change-Id: I868374fa3c7fb9e53af92a4654d08f56e39680d4
Reviewed-on: http://review.typo3.org/44152
Reviewed-by: Andreas Bouche <andreas.bouche@flagbit.de>
Tested-by: Andreas Bouche <andreas.bouche@flagbit.de>
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Sebastian Michaelsen <michaelsen@t3seo.de>
Tested-by: Sebastian Michaelsen <michaelsen@t3seo.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php

index 4242273..f6498f8 100644 (file)
@@ -969,7 +969,9 @@ class EditDocumentController extends AbstractModule
         // Access check...
         // The page will show only if there is a valid page and if this page may be viewed by the user
         $this->pageinfo = BackendUtility::readPageAccess($this->viewId, $this->perms_clause);
-        $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);
+        if ($this->pageinfo) {
+            $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);
+        }
         // Setting up the buttons and markers for docheader
         $this->getButtons();
         $this->languageSwitch($this->firstEl['table'], $this->firstEl['uid'], $this->firstEl['pid']);