From 563fcea4663d4034b64fe70ac5cc02e941e39dec Mon Sep 17 00:00:00 2001
From: Carlos Mella <carlos.mella@mrmilu.com>
Date: Fri, 11 Oct 2024 11:07:22 +0200
Subject: [PATCH] Fix PHP warning.

---
 src/Plugin/MenuItemsFormat/NestedMenuItemsFormat.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/Plugin/MenuItemsFormat/NestedMenuItemsFormat.php b/src/Plugin/MenuItemsFormat/NestedMenuItemsFormat.php
index a99ff5c..b9c9a9c 100644
--- a/src/Plugin/MenuItemsFormat/NestedMenuItemsFormat.php
+++ b/src/Plugin/MenuItemsFormat/NestedMenuItemsFormat.php
@@ -173,7 +173,10 @@ class NestedMenuItemsFormat extends MenuItemsFormatBase implements ContainerFact
     $cache->addCacheableDependency($url);
 
     $id = $menuLink->getPluginId();
-    [$plugin, $menuLinkEntityId] = explode(':', $id);
+    $plugin = '';
+    if (strpos($id, ':') !== FALSE) {
+      [$plugin, $menuLinkEntityId] = explode(':', $id);
+    }
 
     $data = [
       'id' => $id,
-- 
GitLab