Skip to content
Snippets Groups Projects

Issue #3313342: [PHP 8.1] Deprecated function: strpos(): Passing null to parameter #1 LayoutBuilderUiCacheContext.php on line 28

Closed Issue #3313342: [PHP 8.1] Deprecated function: strpos(): Passing null to parameter #1 LayoutBuilderUiCacheContext.php on line 28
3 unresolved threads
Closed Alexandre Dias requested to merge issue/drupal-3313342:3313342- into 9.5.x
3 unresolved threads
2 files
+ 5
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -25,7 +25,10 @@ public static function getLabel() {
* {@inheritdoc}
*/
public function getContext() {
return 'is_layout_builder_ui.' . (int) (strpos(strval($this->routeMatch->getRouteName()), 'layout_builder.') !== 0);
if (!empty($this->routeMatch->getRouteName()) && strpos($this->routeMatch->getRouteName(), 'layout_builder.') === 0) {
return 'is_layout_builder_ui.1';
}
return 'is_layout_builder_ui.0';
}
}
Loading