Skip to content
Snippets Groups Projects
Commit 7e11e35c authored by Alexandre Dias's avatar Alexandre Dias Committed by Ilias Dimopoulos
Browse files

Fixed Deprecated function: strpos(): Passing null.

parent f7b910aa
No related branches found
No related tags found
No related merge requests found
......@@ -158,7 +158,7 @@ function layout_builder_entity_view_alter(array &$build, EntityInterface $entity
// If the entity is displayed within a Layout Builder block and the current
// route is in the Layout Builder UI, then remove all contextual link
// placeholders.
if ($display instanceof LayoutBuilderEntityViewDisplay && strpos($route_name, 'layout_builder.') === 0) {
if ($display instanceof LayoutBuilderEntityViewDisplay && strpos(strval($route_name), 'layout_builder.') === FALSE) {
unset($build['#contextual_links']);
}
}
......
......@@ -25,7 +25,7 @@ public static function getLabel() {
* {@inheritdoc}
*/
public function getContext() {
return 'is_layout_builder_ui.' . (int) (strpos($this->routeMatch->getRouteName(), 'layout_builder.') !== 0);
return 'is_layout_builder_ui.' . (int) (strpos(strval($this->routeMatch->getRouteName()), 'layout_builder.') !== FALSE);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment