Skip to content

Commit

Permalink
Update nullable types for PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeccati authored and nicolas-grekas committed Mar 14, 2024
1 parent 9773676 commit e5e7ddb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Mbstring.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit e5e7ddb

Please sign in to comment.