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

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