[BUGFIX] Correct declaration of $rL_uidRegister 99/48799/4
authorSusanne Moog <typo3@susannemoog.de>
Tue, 5 Jul 2016 07:01:20 +0000 (09:01 +0200)
committerBenni Mack <benni@typo3.org>
Wed, 6 Jul 2016 13:13:48 +0000 (15:13 +0200)
$rL_uidRegister was declared as a string but was
used as an array therefor in PHP 7.1 an exception was
thrown.

Change-Id: Ia0285bb60b6f0f9c5ccde732cce33505c195eb0a
Resolves: #76934
Releases: master
Reviewed-on: https://review.typo3.org/48799
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index d2a240a..817ac77 100644 (file)
@@ -163,9 +163,9 @@ abstract class AbstractMenuContentObject
      * Is filled with an array of page uid numbers + RL parameters which are in the current
      * root line (used to evaluate whether a menu item is in active state)
      *
-     * @var string
+     * @var array
      */
-    public $rL_uidRegister = '';
+    public $rL_uidRegister;
 
     /**
      * @var string
@@ -328,7 +328,8 @@ abstract class AbstractMenuContentObject
             }
             // Gather list of page uids in root line (for "isActive" evaluation). Also adds the MP params in the path so Mount Points are respected.
             // (List is specific for this rootline, so it may be supplied from parent menus for speed...)
-            if (!is_array($this->rL_uidRegister)) {
+            if ($this->rL_uidRegister === null) {
+                $this->rL_uidRegister = [];
                 $rl_MParray = array();
                 foreach ($this->tmpl->rootLine as $v_rl) {
                     // For overlaid mount points, set the variable right now: