Problem/Motivation

In PHP 8.0+ media_include_browser_js throws the following fatal error:

Error: Unknown named parameter $type in media_include_browser_js() (line 61 of media/wysiwyg_plugins/media.inc).

PHP 8.0 introduced a breaking change to call_user_func_array https://www.php.net/call_user_func_array#refsect1-function.call-user-fun...

Steps to reproduce

Use a page with an media browser on PHP 8.0+

Proposed resolution

Change the call to call_user_func_array and filter keys with array_values

CommentFileSizeAuthor
#2 3381132-2.patch629 bytesfenstrat

Comments

fenstrat created an issue. See original summary.

fenstrat’s picture

Status: Active » Needs review
StatusFileSize
new629 bytes
joseph.olstad’s picture

ok this is for 1.x?

ok,

joseph.olstad’s picture

Status: Needs review » Fixed
joseph.olstad’s picture

joseph.olstad’s picture

@fenstrat, thank you! Please let me know if there's any issues with other versions of PHP

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.