From d6f732e719caf70a3d46715e05c01c63c777db3b Mon Sep 17 00:00:00 2001 From: Molkobain Date: Sun, 15 Feb 2026 21:09:54 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B08681=20-=20PHP=208.1:=20Fix=20deprecated?= =?UTF-8?q?=20notice=20for=20null=20value=20passed=20to=20preg=5Fmatch=5Fa?= =?UTF-8?q?ll()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/attributedef.class.inc.php | 3 +++ core/inlineimage.class.inc.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index 150a28cdc4..63830d8e41 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -4259,6 +4259,9 @@ class AttributeText extends AttributeString public static function RenderWikiHtml($sText, $bWikiOnly = false) { + // N°8681 - Ensure to have a string value + $sText = $sText ?? ''; + if (!$bWikiOnly) { $sPattern = '/'.str_replace('/', '\/', utils::GetConfig()->Get('url_validation_pattern')).'/i'; if (preg_match_all( diff --git a/core/inlineimage.class.inc.php b/core/inlineimage.class.inc.php index 50242ff36b..fe4d4a7294 100644 --- a/core/inlineimage.class.inc.php +++ b/core/inlineimage.class.inc.php @@ -266,6 +266,9 @@ class InlineImage extends DBObject */ public static function FixUrls($sHtml) { + // N°8681 - Ensure to have a string value + $sHtml = $sHtml ?? ''; + $aNeedles = []; $aReplacements = []; // Find img tags with an attribute data-img-id