From c63257624895058558dd591d41df033df5b1c05f Mon Sep 17 00:00:00 2001 From: Vahram Date: Thu, 12 Sep 2024 16:20:14 +0400 Subject: [PATCH] Correcting pagination data return type --- src/Libraries/Database/Idiorm/Paginator.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Libraries/Database/Idiorm/Paginator.php b/src/Libraries/Database/Idiorm/Paginator.php index 15ee60e..c822fec 100644 --- a/src/Libraries/Database/Idiorm/Paginator.php +++ b/src/Libraries/Database/Idiorm/Paginator.php @@ -59,10 +59,13 @@ public function lastItem() } /** - * @return array|IdiormResultSet + * @return array */ public function data() { + if (!empty($this->data) && !is_array($this->data)){ + $this->data = $this->data->as_array(); + } return $this->data ?? []; } } \ No newline at end of file