Skip to content
Snippets Groups Projects
Commit a9cd5ffd authored by Pierre Dureau's avatar Pierre Dureau
Browse files

Issue #3474641 by pdureau, grimreaper: LinksPropType: array to string conversion

parent 296b7ae6
No related branches found
No related tags found
1 merge request!218Issue #3474641 by pdureau: LinksPropType: array to string conversion
Pipeline #289698 failed
......@@ -103,7 +103,12 @@ class LinksPropType extends PropTypePluginBase implements ContainerFactoryPlugin
if (array_key_exists("text", $item)) {
// Examples: links.html.twig, breadcrumb.html.twig, pager.html.twig,
// views_mini_pager.html.twig.
$item["title"] = (string) $item["text"];
if (is_scalar($item["text"]) || $item["text"] instanceof \Stringable) {
$item["title"] = (string) $item["text"];
}
else {
$item["title"] = $item["text"];
}
unset($item["text"]);
}
if (!array_key_exists("title", $item)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment