Opened 10 years ago
Closed 10 years ago
#34144 closed defect (bug) (fixed)
`url_to_postid` doesn't recognize URLs with wrong scheme
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 1.0 |
Component: | Rewrite Rules | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
While working on the oEmbed feature plugin I noticed that url_to_postid
doesn't recognize URLs with the wrong URL scheme.
When your site runs HTTPS and you pass a permalink with http://
, you won't get the post ID. The same goes when you provide a https://
URL and is_ssl()
is false.
A simple set_url_scheme( $url )
fixes this. Patch attached.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Previously: #33109