From 42b4525a15faa27af65244c8c10f6bbaf89a71af Mon Sep 17 00:00:00 2001 From: bethrezen Date: Wed, 9 Jul 2014 16:26:10 +0400 Subject: [PATCH] Don't count objects if pagination is disabled --- ArangoProvider.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArangoProvider.php b/ArangoProvider.php index ff33f85..2b12901 100644 --- a/ArangoProvider.php +++ b/ArangoProvider.php @@ -85,7 +85,9 @@ class ArangoProvider extends yii\data\ActiveDataProvider } $result[$item['_key']] = $item; } - $pagination->totalCount = $cursor->getFullCount(); + if (is_object($pagination)) { + $pagination->totalCount = $cursor->getFullCount(); + } return $result; }