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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3381132-2.patch | 629 bytes | fenstrat |
Comments
Comment #2
fenstratComment #3
joseph.olstadok this is for 1.x?
ok,
Comment #5
joseph.olstadComment #6
joseph.olstadhttps://www.drupal.org/project/media/releases/7.x-1.10
Comment #7
joseph.olstad@fenstrat, thank you! Please let me know if there's any issues with other versions of PHP