mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
[ticket/17496] Fix Implicitly marking parameters as nullable PHP deprecations
Also use union types consistently instead of question marks. Fixed with php-cs-fixer. PHPBB-17496
This commit is contained in:
@@ -130,7 +130,7 @@ function phpbb_gmgetdate($time = false)
|
||||
*
|
||||
* @return array|string data array if $string_only is false
|
||||
*/
|
||||
function get_formatted_filesize($value, bool $string_only = true, array $allowed_units = null)
|
||||
function get_formatted_filesize($value, bool $string_only = true, array|null $allowed_units = null)
|
||||
{
|
||||
global $user;
|
||||
|
||||
@@ -253,7 +253,7 @@ function still_on_time($extra_time = 15)
|
||||
* @return mixed Boolean (true, false) if comparison operator is specified.
|
||||
* Integer (-1, 0, 1) otherwise.
|
||||
*/
|
||||
function phpbb_version_compare(string $version1, string $version2, string $operator = null)
|
||||
function phpbb_version_compare(string $version1, string $version2, string|null $operator = null)
|
||||
{
|
||||
$version1 = strtolower($version1);
|
||||
$version2 = strtolower($version2);
|
||||
|
Reference in New Issue
Block a user