Verified Commit 341af8bf authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3313342 by Rajeshreeputra, idimopoulos, claudiu.cristea, deepakkm,...

Issue #3313342 by Rajeshreeputra, idimopoulos, claudiu.cristea, deepakkm, saidatom, afsch, xjm, Bhanu951: [PHP 8.1] Deprecated function: strpos(): Passing null to parameter #1 LayoutBuilderUiCacheContext.php on line 28
parent 56913d2a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -25,7 +25,11 @@ public static function getLabel() {
   * {@inheritdoc}
   */
  public function getContext() {
    return 'is_layout_builder_ui.' . (int) !str_starts_with($this->routeMatch->getRouteName(), 'layout_builder.');
    $route_name = $this->routeMatch->getRouteName();
    if ($route_name && str_starts_with($route_name, 'layout_builder.')) {
      return 'is_layout_builder_ui.0';
    }
    return 'is_layout_builder_ui.1';
  }

}