Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring deprecated override files up to php8.4 syntax #464

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deprecated/datetime.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @deprecated The Safe version of this function is no longer needed in PHP 8.0+
*
*/
function gmdate(string $format, int $timestamp = null): string
function gmdate(string $format, ?int $timestamp = null): string
{
error_clear_last();
if ($timestamp !== null) {
Expand Down Expand Up @@ -75,7 +75,7 @@ function gmdate(string $format, int $timestamp = null): string
* @deprecated The Safe version of this function is no longer needed in PHP 8.0+
*
*/
function mktime(int $hour, int $minute = null, int $second = null, int $month = null, int $day = null, int $year = null): int
function mktime(int $hour, ?int $minute = null, ?int $second = null, ?int $month = null, ?int $day = null, ?int $year = null): int
{
error_clear_last();
if ($year !== null) {
Expand Down
4 changes: 2 additions & 2 deletions deprecated/mssql.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function mssql_close($link_identifier = null): void
* @throws MssqlException
*
*/
function mssql_connect(string $servername = null, string $username = null, string $password = null, bool $new_link = false)
function mssql_connect(?string $servername = null, ?string $username = null, ?string $password = null, bool $new_link = false)
{
error_clear_last();
if ($new_link !== false) {
Expand Down Expand Up @@ -330,7 +330,7 @@ function mssql_init(string $sp_name, $link_identifier = null)
* @throws MssqlException
*
*/
function mssql_pconnect(string $servername = null, string $username = null, string $password = null, bool $new_link = false)
function mssql_pconnect(?string $servername = null, ?string $username = null, ?string $password = null, bool $new_link = false)
{
error_clear_last();
if ($new_link !== false) {
Expand Down
2 changes: 1 addition & 1 deletion deprecated/password.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
* @deprecated The Safe version of this function is no longer needed in PHP 8.0+
*
*/
function password_hash(string $password, $algo, array $options = null): string
function password_hash(string $password, $algo, ?array $options = null): string
{
error_clear_last();
if ($options !== null) {
Expand Down
2 changes: 1 addition & 1 deletion deprecated/strings.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ function sprintf(string $format, ...$params): string
* @deprecated The Safe version of this function is no longer needed in PHP 8.0+
*
*/
function substr(string $string, int $start, int $length = null): string
function substr(string $string, int $start, ?int $length = null): string
{
error_clear_last();
if ($length !== null) {
Expand Down
Loading