mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #5024 from froog/patch-2
API Ensure filterByCallback returns object of called class
This commit is contained in:
commit
cfd8102431
@ -548,7 +548,7 @@ class ArrayList extends ViewableData implements SS_List, SS_Filterable, SS_Sorta
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = ArrayList::create();
|
$output = static::create();
|
||||||
|
|
||||||
foreach($this as $item) {
|
foreach($this as $item) {
|
||||||
if(call_user_func($callback, $item, $this)) $output->push($item);
|
if(call_user_func($callback, $item, $this)) $output->push($item);
|
||||||
|
Loading…
Reference in New Issue
Block a user