Skip to content

Commit

Permalink
Fix deprecated implicit marking of parameters as nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
campbell-m committed Jul 5, 2024
1 parent df7e57c commit bdb2107
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/language.inc
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ function get_lang_preferences() : array
// Note: the first time this function is called, it should be called with a $locale.
// Subsequent calls will just return the static $lang variable which was calculated on
// the first call
function get_mrbs_lang(string $locale=null)
function get_mrbs_lang(?string $locale=null)
{
global $disable_automatic_language_changing,
$default_language_tokens,
Expand Down Expand Up @@ -466,7 +466,7 @@ function get_langtags(string $dir, string $prefix='', string $suffix='') : array
//
// The file names are assumed to be of the form $prefix . $lang . $suffix, eg
// 'datepicker-en-GB.js'
function get_best_lang_file(string $dir, string $prefix='', string $suffix='', array $default_langtags=null, array $lang_map=null) : ?string
function get_best_lang_file(string $dir, string $prefix='', string $suffix='', ?array $default_langtags=null, ?array $lang_map=null) : ?string
{
if (!is_dir($dir))
{
Expand Down Expand Up @@ -788,7 +788,7 @@ function get_loc_field_name(string $table, string $name) : string
}


function datetime_format(array $format, int $timestamp=null, string $locale=null) : string
function datetime_format(array $format, ?int $timestamp=null, ?string $locale=null) : string
{
global $icu_override, $timezone;

Expand Down Expand Up @@ -846,7 +846,7 @@ function datetime_format(array $format, int $timestamp=null, string $locale=null

// Determines whether a locale (default the current locale) uses a 12-hour clock.
// Returns NULL if it can't be determined.
function is_ampm(string $locale=null) : ?bool
function is_ampm(?string $locale=null) : ?bool
{
global $datetime_formats;

Expand Down

0 comments on commit bdb2107

Please sign in to comment.