mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
harden addFilter method
This commit is contained in:
parent
c5cf19a86a
commit
bf3f159800
@ -372,8 +372,10 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a new instance of the list with an added filter
|
* Return a new instance of the list with an added filter
|
||||||
|
*
|
||||||
|
* @param array $filterArray
|
||||||
*/
|
*/
|
||||||
public function addFilter($filterArray) {
|
public function addFilter(array $filterArray) {
|
||||||
$list = $this;
|
$list = $this;
|
||||||
|
|
||||||
foreach($filterArray as $field => $value) {
|
foreach($filterArray as $field => $value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user