Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix call_user_func_array() arguments on PHP 8 #30608

Merged
merged 2 commits into from
Nov 14, 2020
Merged

Fix call_user_func_array() arguments on PHP 8 #30608

merged 2 commits into from
Nov 14, 2020

Conversation

SharkyKZ
Copy link
Contributor

@SharkyKZ SharkyKZ commented Sep 9, 2020

Pull Request for Issue # .

Summary of Changes

Changes second argument of call_user_func_array() from associative to indexed array. Before PHP 8 both types of arrays work the same but on PHP 8 associative arrays are interpreted as "named parameters". In our case this causes code to break.

Testing Instructions

Use PHP 8.
Open article form.

Actual result BEFORE applying this Pull Request

Error:

Unknown named parameter $name

Expected result AFTER applying this Pull Request

No errors, editor and editor buttons appear correctly.

Documentation Changes Required

No.

@alikon
Copy link
Contributor

alikon commented Sep 24, 2020

unable to replicate on PHP Version 8.0.0-dev

@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Sep 24, 2020

@alikon How recent is your PHP build? I'm using Beta 4.

@alikon
Copy link
Contributor

alikon commented Sep 24, 2020

my php images is based on https://github.com/devilbox/docker-php-fpm-8.0

@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Oct 2, 2020

Just tried with RC1. Issue still exists.

@SharkyKZ SharkyKZ added the PHP 8.x PHP 8.x deprecated issues label Oct 7, 2020
@alikon
Copy link
Contributor

alikon commented Nov 7, 2020

I have tested this item ✅ successfully on 4ca4641


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30608.

@HLeithner HLeithner merged commit 2d86280 into joomla:staging Nov 14, 2020
@HLeithner
Copy link
Member

Tested successfully, thanks

@HLeithner HLeithner added this to the Joomla! 3.9.23 milestone Nov 14, 2020
@SharkyKZ SharkyKZ deleted the j3/php8/event branch November 14, 2020 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PHP 8.x PHP 8.x deprecated issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants