diff --git a/core/inlineimage.class.inc.php b/core/inlineimage.class.inc.php index 37232fded..a632045b1 100644 --- a/core/inlineimage.class.inc.php +++ b/core/inlineimage.class.inc.php @@ -259,12 +259,14 @@ class InlineImage extends DBObject * that refer to an InlineImage (detected via the attribute data-img-id="") so that * the URL is consistent with the current URL of the application. * - * @param string $sHtml The HTML fragment to process +N°8681 * @param string|null $sHtml The HTML fragment to process * * @return string The modified HTML * @throws \Exception + * + * @since 3.3.0 N°8681 Add type hint for parameters and return value */ - public static function FixUrls($sHtml) + public static function FixUrls(string|null $sHtml): string { // N°8681 - Ensure to have a string value $sHtml = $sHtml ?? ''; diff --git a/sources/Core/AttributeDefinition/AttributeText.php b/sources/Core/AttributeDefinition/AttributeText.php index c5727f288..b6386cf76 100644 --- a/sources/Core/AttributeDefinition/AttributeText.php +++ b/sources/Core/AttributeDefinition/AttributeText.php @@ -95,7 +95,19 @@ class AttributeText extends AttributeString return 65535; } - public static function RenderWikiHtml($sText, $bWikiOnly = false) + /** + * @param string|null $sText + * @param bool $bWikiOnly + * + * @return string + * @throws \ArchivedObjectException + * @throws \ConfigException + * @throws \CoreException + * @throws \DictExceptionMissingString + * + * @since 3.3.0 N°8681 Add type hint for parameters and return value + */ + public static function RenderWikiHtml(string|null $sText, bool $bWikiOnly = false): string { // N°8681 - Ensure to have a string value $sText = $sText ?? '';