N°8681 - PHP 8.1: Fix deprecated notice for null value passed to preg_match_all() (#803)

* N°8681 - PHP 8.1: Fix deprecated notice for null value passed to preg_match_all()

* N°8681 - Add unit tests

* N°8681 - Add unit tests
This commit is contained in:
Molkobain
2026-02-16 16:18:04 +01:00
committed by GitHub
parent 82b7ef86c7
commit 6bd5a7b634
5 changed files with 123 additions and 7 deletions

View File

@@ -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(