From 248f5fa7c558deaffd53775caec91487a693e219 Mon Sep 17 00:00:00 2001
From: MLE20684 <marc.le_boulch2@open-groupe.com>
Date: Thu, 11 May 2023 15:38:32 +0200
Subject: [PATCH] Issue #3359676 controle if parse_url parameter is null.

---
 core/modules/menu_link_content/src/Entity/MenuLinkContent.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/modules/menu_link_content/src/Entity/MenuLinkContent.php b/core/modules/menu_link_content/src/Entity/MenuLinkContent.php
index 5e99a557d0fd..1fb18e950a1c 100644
--- a/core/modules/menu_link_content/src/Entity/MenuLinkContent.php
+++ b/core/modules/menu_link_content/src/Entity/MenuLinkContent.php
@@ -195,7 +195,7 @@ public static function preCreate(EntityStorageInterface $storage, array &$values
   public function preSave(EntityStorageInterface $storage) {
     parent::preSave($storage);
 
-    if (parse_url($this->link->uri, PHP_URL_SCHEME) === 'internal') {
+    if (is_null($this->link->uri) && parse_url($this->link->uri, PHP_URL_SCHEME) === 'internal') {
       $this->setRequiresRediscovery(TRUE);
     }
     else {
-- 
GitLab

