diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/PageViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/PageViewHelper.php
index 728a4c0f29d8c8c2e7b361d401b4e908763ef06f..98cfad40bb0bbe13506dc292f444f11fce29d587 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/PageViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/PageViewHelper.php
@@ -94,7 +94,7 @@ class PageViewHelper extends AbstractViewHelper
         }
         $pageUid = $arguments['pageUid'];
         $additionalParams = $arguments['additionalParams'];
-        $pageType = $arguments['pageType'];
+        $pageType = (int)($arguments['pageType'] ?? 0);
         $noCache = $arguments['noCache'];
         $section = $arguments['section'];
         $language = $arguments['language'] ?? null;
diff --git a/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/PageViewHelperTest.php b/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/PageViewHelperTest.php
index 84e349af1989b23fca699eafbf0f7b1cab49512f..159937f01cd560602864d9d1307b427c1fee5ff0 100644
--- a/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/PageViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/PageViewHelperTest.php
@@ -43,6 +43,10 @@ class PageViewHelperTest extends FunctionalTestCase
                 '<f:link.page pageUid="1">linkMe</f:link.page>',
                 '<a href="/">linkMe</a>',
             ],
+            'link to root page with page type' => [
+                '<f:link.page pageUid="1" pageType="1234">linkMe</f:link.page>',
+                '<a href="/?type=1234">linkMe</a>',
+            ],
             'link to page sub page' => [
                 '<f:link.page pageUid="3">linkMe</f:link.page>',
                 '<a href="/dummy-1-2/dummy-1-2-3">linkMe</a>',
diff --git a/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Uri/PageViewHelperTest.php b/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Uri/PageViewHelperTest.php
index 059c9a43dbece71712569c1725e816de3f9fa67e..2b8e5fa884d65f3d7510f644fffb337142521a45 100644
--- a/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Uri/PageViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Uri/PageViewHelperTest.php
@@ -43,6 +43,10 @@ class PageViewHelperTest extends FunctionalTestCase
                 '<f:uri.page pageUid="1" />',
                 '/',
             ],
+            'link to root page with page type' => [
+                '<f:uri.page pageUid="1" pageType="1234" />',
+                '/?type=1234',
+            ],
             'link to page sub page' => [
                 '<f:uri.page pageUid="3" />',
                 '/dummy-1-2/dummy-1-2-3',