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

Incorrect deprecation notice for sanitize_url() #273

Closed
1 task done
wsform opened this issue Sep 23, 2023 · 2 comments
Closed
1 task done

Incorrect deprecation notice for sanitize_url() #273

wsform opened this issue Sep 23, 2023 · 2 comments

Comments

@wsform
Copy link

wsform commented Sep 23, 2023

Describe the bug

This deprecation notice is incorrect:

sanitize_url() has been deprecated since WordPress version 2.8.0. Use esc_url_raw() instead.

According to the documentation it was restored (un-deprecated) in version 5.9.

https://developer.wordpress.org/reference/functions/sanitize_url/

In: DeprecatedFunctionsSniff.php

    'sanitize_url' => array(
        'alt'     => 'esc_url_raw()',
        'version' => '2.8.0',
    ),

Steps to Reproduce

  1. Run the checks on any plugin that contains the function sanitize_url()
  2. Error shown: WordPress.WP.DeprecatedFunctions.sanitize_urlFound

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@r-martins
Copy link

I've tested a plugin with sanitize_url calls and could not reproduce the error you mentioned.

Using: WP 6.3.2
Plugin check: trunk (85e2a7) n.e.x.t

Also tested with the tag 0.2.1. Could not reproduce.

Can you send a link to the plugin you've tested and which version you used?

@swissspidy
Copy link
Member

This might have been reported when using the (old) version from the plugin repository, but the one here in the repo does not have the same issue, because we're using WPCS 3.0 and this has been address there a long time ago.

@swissspidy swissspidy closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
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

3 participants