Fatal error in media_include_browser_js() on PHP 8.0+

Created on 15 August 2023, over 1 year ago

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

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇦🇺Australia fenstrat Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024