From 6f20def61aa39fbc7ebba486ebcddf8f0ba01b72 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 21 Oct 2024 16:05:06 +1300 Subject: [PATCH] API Check is instance of SS_List --- code/Report.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/Report.php b/code/Report.php index 7e5b4283..e2416d5a 100644 --- a/code/Report.php +++ b/code/Report.php @@ -25,7 +25,6 @@ use SilverStripe\ORM\CMSPreviewable; use SilverStripe\ORM\DataList; use SilverStripe\ORM\DataQuery; -use SilverStripe\Model\List\Limitable; use SilverStripe\Model\List\SS_List; use SilverStripe\Security\Member; use SilverStripe\Security\Permission; @@ -239,7 +238,7 @@ public function getCount($params = array(), $limit = null) } // Some reports may not use the $limit parameter in sourceRecords since it isn't actually // used anywhere else - so make sure we limit record counts if possible. - if ($sourceRecords instanceof Limitable) { + if ($sourceRecords instanceof SS_List) { $sourceRecords = $sourceRecords->limit($limit); } return $sourceRecords->count();