[BUGFIX] Correctly handle forceTypeValue = 0 04/40504/2
authorBenjamin Mack <benni@typo3.org>
Sun, 21 Jun 2015 08:24:52 +0000 (10:24 +0200)
committerBenjamin Mack <benni@typo3.org>
Sun, 21 Jun 2015 08:25:25 +0000 (10:25 +0200)
Setting config.forceTypeValue or forceTypeValue in GMENU, TMENU,
IMGMENU or JSMENU objects to 0 (zero) is now handled properly
and type is forced to zero.

Resolves: #23270
Releases: master, 6.2
Change-Id: If4a829aacf091ec3fae78329915b7c74619245b3
Reviewed-on: http://review.typo3.org/40504
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index b01b187..397e367 100644 (file)
@@ -1809,8 +1809,8 @@ class AbstractMenuContentObject {
                $conf = array(
                        'parameter' => is_array($overrideArray) && $overrideArray['uid'] ? $overrideArray['uid'] : $page['uid']
                );
-               if ($typeOverride && MathUtility::canBeInterpretedAsInteger($typeOverride)) {
-                       $conf['parameter'] .= ',' . $typeOverride;
+               if (MathUtility::canBeInterpretedAsInteger($typeOverride)) {
+                       $conf['parameter'] .= ',' . (int)$typeOverride;
                }
                if ($addParams) {
                        $conf['additionalParams'] = $addParams;