mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
d201312a0e
PHP 8 added support for named parameters however will throw an error when a named parameter, which does not exist, will be called/appears. In this case the code uses `array_filter(compact('subject))` to conveniently prepend `$subject` to the callback, if it's non-null. It's then combined with `$params` but mixing a hash wih a sequential array and then end result is `['subject' => …, ]` which then triggers this TypeError in PHP 8. The solution applies `array_values()` on above array as to remove the keys and then the error disappears. With this change, our internal test suite (2k tests) is green on both PHP8 and PHP7.4, aka this change is expecte to be backwards compatible. |
||
---|---|---|
.. | ||
Cache | ||
Config | ||
Configure | ||
Console | ||
Controller | ||
Core | ||
Error | ||
Event | ||
I18n | ||
Log | ||
Model | ||
Network | ||
Routing | ||
Test | ||
TestSuite | ||
Utility | ||
View | ||
basics.php | ||
bootstrap.php | ||
LICENSE.txt | ||
VERSION.txt |