Skip to:

Opened 22 months ago

Last modified 22 months ago

#8018 new defect (bug)

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:


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:

if ( false === $this->validate_url_to_item_id( $query_params['url'] ) ) {
	return $served;

Maybe this could be changed to:

if ( ! isset( $query_params['url'] ) || false === $this->validate_url_to_item_id( $query_params['url'] ) ) {
	return $served;

Change History (1)

#1 @boonebgorges
22 months ago

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 an isset() check. Maybe @djpaul can chime in.

Note: See TracTickets for help on using tickets.