From 62778e3af74ce8bf6de4fd1211cd8989ef5a14cc Mon Sep 17 00:00:00 2001
From: Maksym Chubin <maksim.chubin@netzlabor.co>
Date: Mon, 21 Jun 2021 15:03:30 +0300
Subject: [PATCH] [FIX] Add MenuItemPage title and subtitle type casting to
 string

---
 Classes/Domain/Model/MenuItemPage.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Classes/Domain/Model/MenuItemPage.php b/Classes/Domain/Model/MenuItemPage.php
index f3712eb..2d39308 100644
--- a/Classes/Domain/Model/MenuItemPage.php
+++ b/Classes/Domain/Model/MenuItemPage.php
@@ -13,9 +13,9 @@ class MenuItemPage extends MenuItem
      */
     public function getTitle(): string
     {
-        return (string) $this->title ?:
+        return (string) ($this->title ?:
             ObjectAccess::getPropertyPath($this, 'page.navTitle') ?:
-                ObjectAccess::getPropertyPath($this, 'page.title');
+                ObjectAccess::getPropertyPath($this, 'page.title'));
     }
 
     /**
@@ -23,7 +23,7 @@ class MenuItemPage extends MenuItem
      */
     public function getSubtitle(): string
     {
-        return (string) $this->subtitle ?:
-            ObjectAccess::getPropertyPath($this, 'page.subtitle');
+        return (string) ($this->subtitle ?:
+            ObjectAccess::getPropertyPath($this, 'page.subtitle'));
     }
 }
-- 
GitLab