mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #15154 from mfn/mfn-php8-compat
[2.x] php-8.0-compat: fix "Error: Unknown named parameter $subject"
This commit is contained in:
commit
da9f6991c5
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ abstract class ObjectCollection {
|
||||||
}
|
}
|
||||||
$result = null;
|
$result = null;
|
||||||
foreach ($list as $name) {
|
foreach ($list as $name) {
|
||||||
$result = call_user_func_array(array($this->_loaded[$name], $callback), array_filter(compact('subject')) + $params);
|
$result = call_user_func_array(array($this->_loaded[$name], $callback), array_values(array_filter(compact('subject')) + $params));
|
||||||
if ($options['collectReturn'] === true) {
|
if ($options['collectReturn'] === true) {
|
||||||
$collected[] = $result;
|
$collected[] = $result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue