[BUGFIX] Improve accessibiity-check of index page in HMENU 'browse' 24/46924/2
authorMarkus Hoelzle <typo3@markus-hoelzle.de>
Tue, 16 Feb 2016 14:13:30 +0000 (15:13 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 26 Feb 2016 18:40:13 +0000 (19:40 +0100)
The special HMENU 'browse' should check whether the page is
really accessible to avoid sql errors.

Resolves: #73493
Releases: master, 7.6
Change-Id: I5b2d49a094b6495a72d9ce055f6f98c799a9419c
Reviewed-on: https://review.typo3.org/46924
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index 1e880aa..d458d91 100644 (file)
@@ -1102,7 +1102,7 @@ abstract class AbstractMenuContentObject
             $recArr['last'] = end($prevnext_menu);
             // prevsection / nextsection is found
             // You can only do this, if there is a valid page two levels up!
             $recArr['last'] = end($prevnext_menu);
             // prevsection / nextsection is found
             // You can only do this, if there is a valid page two levels up!
-            if (is_array($recArr['index'])) {
+            if (!empty($recArr['index']['uid'])) {
                 $prevnextsection_menu = $this->removeInaccessiblePages($this->sys_page->getMenu($recArr['index']['uid'], '*', $sortingField, $additionalWhere));
                 $lastKey = 0;
                 $nextActive = 0;
                 $prevnextsection_menu = $this->removeInaccessiblePages($this->sys_page->getMenu($recArr['index']['uid'], '*', $sortingField, $additionalWhere));
                 $lastKey = 0;
                 $nextActive = 0;