From cfb791c3be13fa55fdca437627ccf14a5fcce420 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Fri, 3 Apr 2020 09:31:00 +0200 Subject: [PATCH] Allow null for Util::convertBitDefaultValue function Signed-off-by: William Desportes --- libraries/classes/Util.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/classes/Util.php b/libraries/classes/Util.php index e9925af3fb..9941ed1dbf 100644 --- a/libraries/classes/Util.php +++ b/libraries/classes/Util.php @@ -1454,11 +1454,11 @@ class Util * Converts a BIT type default value * for example, b'010' becomes 010 * - * @param string $bit_default_value value + * @param string|null $bit_default_value value * * @return string the converted value */ - public static function convertBitDefaultValue(string $bit_default_value): string + public static function convertBitDefaultValue(?string $bit_default_value): string { return (string) preg_replace("/^b'(\d*)'?$/", '$1', htmlspecialchars_decode((string) $bit_default_value, ENT_QUOTES), 1); }