From e5e7ddb00b859dbdf5ad8f3bbe4cd29a3a37aa34 Mon Sep 17 00:00:00 2001 From: Matteo Beccati Date: Thu, 14 Mar 2024 14:33:56 +0100 Subject: [PATCH] Update nullable types for PHP 8.4 --- Mbstring.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mbstring.php b/Mbstring.php index 2e0b969..04b35cb 100644 --- a/Mbstring.php +++ b/Mbstring.php @@ -827,7 +827,7 @@ public static function mb_ord($s, $encoding = null) return $code; } - public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, string $encoding = null): string + public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, ?string $encoding = null): string { if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) { throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH');