#62252 closed defect (bug) (fixed)
wp_is_https_supported uses deprecated function
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | trivial | Version: | 6.4 |
Component: | Site Health | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
Function wp_update_https_detection_errors is marked as deprecated but is still used by function wp_is_https_supported.
Think this is triggered from cron job wp_site_health_scheduled_check. I think it will only occur on the first run of this after a new installation if option https_detection_errors is not already set. After that, option https_detection_errors will be set, and the call to wp_update_https_detection_errors will be bypassed.
Change History (11)
This ticket was mentioned in PR #7598 on WordPress/wordpress-develop by @debarghyabanerjee.
8 months ago
#2
- Keywords has-patch has-unit-tests added
Trac Ticket: Core-62252
## Summary
- This pull request updates the
wp_is_https_supported
function to remove the use of the deprecated HTTPS detection mechanism. Instead, it now utilizes the wp_get_https_detection_errors function, which is the recommended approach for determining HTTPS support on the server and domain.
## Changes Made
- Replaced the deprecated logic for checking HTTPS support with a call to
wp_get_https_detection_errors()
.
- Updated the return statement to check for errors returned by the new method. If there are any errors, the function will return false, indicating that HTTPS is not supported.
## Detailed Explanation
- Reason for Change: The previous implementation of wp_is_https_supported relied on a deprecated method that may no longer function as expected in future releases. Using
wp_get_https_detection_errors
aligns with the current best practices for handling HTTPS detection in WordPress.
Functionality:
- The updated wp_is_https_supported function checks for any HTTPS detection errors by calling
wp_get_https_detection_errors()
.
- It returns true if no errors are found, indicating that HTTPS is supported, and false if there are errors.
@debarghyabanerjee commented on PR #7598:
8 months ago
#3
Hi @peterwilsoncc , can you please take a look into this PR. Thanks.
#4
@
8 months ago
- Milestone changed from Awaiting Review to 6.8
- Owner set to flixos90
- Status changed from new to reviewing
See #58494 for the original ticket that made the change.
The PR looks technically good to me, but we should address a few things in the documentation per https://github.com/WordPress/wordpress-develop/pull/7598/files#r1809152986.
@debarghyabanerjee commented on PR #7598:
8 months ago
#5
Hi @felixarntz , I have updated the Doc block comments, can you please take a look into it. Thanks.
This ticket was mentioned in PR #7760 on WordPress/wordpress-develop by @geekofshire.
7 months ago
#7
Replaced the deprecated wp_update_https_detection_errors()
function with wp_get_https_detection_errors()
to align with the latest WordPress standards and avoid deprecation warnings.
Trac ticket: https://core.trac.wordpress.org/ticket/62252
#8
@
7 months ago
I've gone and pointed the PR associated with #62364 to this ticket so it also can be considered. Props to @sebastienserre for that one.
@flixos90 commented on PR #7760:
6 months ago
#9
@geekofshire Thank you for the pull request! It looks like this is a duplicate of #7598, which already implemented this change correctly, so I'm going to close this in favor of the other PR. I'll make sure to give you props on the WordPress Core commit though, thanks again!
@flixos90 commented on PR #7598:
6 months ago
#11
Committed in https://core.trac.wordpress.org/changeset/59517
cc @flixos90