Skip to content
Snippets Groups Projects
Commit 62778e3a authored by Maksym Chubin's avatar Maksym Chubin
Browse files

[FIX] Add MenuItemPage title and subtitle type casting to string

parent 4ca53969
Branches
No related tags found
No related merge requests found
......@@ -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'));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment