Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Conversation

@Utsav-Ladani
Copy link
Contributor

Fix PHP@8.1 deprecation errors and enhance security checks

Fix PHP@8.1 deprecation errors

  • Replace FILTER_SANITIZE_STRING with FILTER_SANITIZE_FULL_SPECIAL_CHARS.

Enhance security checks

  • Change escaping functions esc_attr to esc_html and vise-versa on required places.
  • Replace current_user_can( 'administrator' ) with current_user_can( 'manage_options' ) because there is not such capability with the name administrator.

Related issues

Replace FILTER_SANITIZE_STRING with FILTER_SANITIZE_FULL_SPECIAL_CHARS. Change escaping functions. Correct 'user is admin1' check.

Closes: 275
Copy link

@vishalkakadiya vishalkakadiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor feedback, LGTM!

@Utsav-Ladani Utsav-Ladani merged commit ced3d8a into develop Oct 18, 2023
@Utsav-Ladani Utsav-Ladani deleted the fix/PHP-deprecation-error branch October 18, 2023 12:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants