Opened 6 years ago
Closed 6 years ago
#49872 closed defect (bug) (fixed)
PHP Notice: Undefined index: path in /wp-includes/functions.php on line 905
| Reported by: | jbouganim | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.5 |
| Component: | Pings/Trackbacks | Version: | 4.4 |
| Severity: | normal | Keywords: | has-patch needs-unit-tests |
| Cc: | Focuses: |
Description
Some URLs here do not have a 'path' and thus throw this notice.
Instead of only checking on /wp-includes/functions.php L904:
<?php if ( false !== $url_parts )
should also check
<?php if ( false !== $url_parts && !empty($url_parts['path']) )
Attachments (1)
Change History (7)
#1
@
6 years ago
- Component General → Pings/Trackbacks
- Keywords has-patch added
- Severity minor → normal
- Version 5.4 → 4.4
Hi, @jbouganim,
Welcome to WordPress Trac! Thanks for the ticket.
Added initial patch as suggested.
#3
@
6 years ago
@Otto42 Sure.
<?php $url_parts = parse_url("https://redirect.viglink.com?key=2fb2035e82f6fb61e704bd9&u=https%3A%2F%2Fwww.michaels.com%2Fsearch%3Fq%3Dbandana");
Will not have a path index.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Initial patch.