[buddypress-trac] [BuddyPress Trac] #8018: Undefine Index Error in class-bp-core-oembed-extension.php

buddypress-trac noreply at wordpress.org
Mon Dec 3 08:36:34 UTC 2018


#8018: Undefine Index Error in class-bp-core-oembed-extension.php
--------------------------+-----------------------------
 Reporter:  Venutius      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  3.0.0
 Severity:  normal        |   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:

 {{{
 !#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;
 }

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8018>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list