Skip to content

Commit 9a2cd88

Browse files
committed
Fixing call-time pass by reference.
1 parent bf551c2 commit 9a2cd88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cake/libs/set.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,10 +1163,10 @@ function apply($path, $data, $callback, $options = array()) {
11631163
$extracted = Set::extract($path, $data);
11641164

11651165
if ($options['type'] === 'map') {
1166-
$result = array_map($callback, &$extracted);
1166+
$result = array_map($callback, $extracted);
11671167

11681168
} elseif ($options['type'] === 'reduce') {
1169-
$result = array_reduce(&$extracted, $callback);
1169+
$result = array_reduce($extracted, $callback);
11701170

11711171
} elseif ($options['type'] === 'pass') {
11721172
$result = call_user_func_array($callback, array($extracted));

0 commit comments

Comments
 (0)