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

Confirmation of class-dm-rest-domains-controller.php PHP 8.1 Compatibility #113

Open
cmcandrew opened this issue May 9, 2024 · 1 comment

Comments

@cmcandrew
Copy link

Question of whether this is a false positive?

------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------
 455 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
 461 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0; Use mysqli instead
------------------------------------------------------------------------------------------------------------
@cameronterry
Copy link
Owner

That would appear to be related to these function calls in the REST API:

if ( '0000-00-00 00:00:00' === $data['site']['registered'] ) {
$data['site']['registered'] = null;
} else {
$data['site']['registered'] = mysql_to_rfc3339( $data['site']['registered'] );
}
if ( '0000-00-00 00:00:00' === $data['site']['last_updated'] ) {
$data['site']['last_updated'] = null;
} else {
$data['site']['last_updated'] = mysql_to_rfc3339( $data['site']['last_updated'] );
}

Then yes, I believe they are false positives.

As the mysql_to_rfc3339() is part of WordPress Core: https://developer.wordpress.org/reference/functions/mysql_to_rfc3339/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants