1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-28 07:41:55 +03:00

Allow null for Util::convertBitDefaultValue function

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes
2020-04-03 09:31:00 +02:00
parent 4cf15f7f8f
commit cfb791c3be

View File

@@ -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);
}