Opened 6 years ago
Closed 4 years ago
#8018 closed defect (bug) (fixed)
Undefine Index Error in class-bp-core-oembed-extension.php
Reported by: | Venutius | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 3.0.0 |
Component: | Media | Keywords: | |
Cc: |
Description
I get the following error message very occasionally:
[03-Dec-2018 06:23:16 UTC] PHP Notice: Undefined index: url in /wp-content/plugins/buddypress/bp-core/classes/class-bp-core-oembed-extension.php on line 483
Looking at the code, it seems to be checking for validity of the url:
!#python if ( false === $this->validate_url_to_item_id( $query_params['url'] ) ) { return $served; }
Maybe this could be changed to:
!#python if ( ! isset( $query_params['url'] ) || false === $this->validate_url_to_item_id( $query_params['url'] ) ) { return $served; }
Change History (2)
Note: See
TracTickets for help on using
tickets.
Thanks for the ticket, @Venutius.
Is it a bug that
$query_params['url']
would sometimes be empty? If so, I don't want to paper over it with anisset()
check. Maybe @djpaul can chime in.