Skip to:
Content

BuddyPress.org

#8921 closed defect (bug) (fixed)

extract_audio can cause depreciation notice in PHP 8.1

Reported by: thomaslhotta's profile thomaslhotta Owned by: imath's profile imath
Milestone: 11.3.0 Priority: normal
Severity: normal Version: 11.2.0
Component: Core Keywords: reporter-feedback has-patch
Cc:

Description

Hi

extract_audio can cause a depreciation notice on line 645 when calling untrailingslashit if it encounters a link that only has a query parameter and no path. A link like

<a id="reload" href="?reload">Reload</a>

will cause the error.

Change History (6)

#1 @thomaslhotta
18 months ago

Just adding a typecast before the untrailingslashit call should fix this.

#2 @dhrumilk
18 months ago

  • Keywords needs-patch reporter-feedback added

#3 @imath
18 months ago

  • Milestone changed from Awaiting Review to 11.3.0

This ticket was mentioned in PR #122 on buddypress/buddypress by @imath.


18 months ago
#4

  • Keywords has-patch added; needs-patch removed

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

Trac ticket: https://buddypress.trac.wordpress.org/ticket/8921

#5 @imath
18 months ago

In 13508:

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

#6 @imath
18 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 13509:

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

Fixes #8921 (branch 11.0)

Note: See TracTickets for help on using tickets.