mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 17:48:43 +02:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user