Skip to:
Content

BuddyPress.org

Changeset 13508


Ignore:
Timestamp:
07/01/2023 11:31:52 AM (12 months ago)
Author:
imath
Message:

Prevent a PHP 8.1 deprecation notice in BP_Media_Extractor class

In BP_Media_Extractor::extract_audio() make sure $path is a string.

Props thomaslhotta

See #8921 (trunk)
Closes https://github.com/buddypress/buddypress/pull/122

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-media-extractor.php

    r13500 r13508  
    642642
    643643            foreach ( $links['links'] as $link ) {
    644                 $path = parse_url( $link['url'], PHP_URL_PATH );
     644                $path = (string) wp_parse_url( $link['url'], PHP_URL_PATH );
    645645
    646646                // Check this URL's file extension matches that of an accepted audio format.
Note: See TracChangeset for help on using the changeset viewer.