From a7d725c13407417a2a65ff74319e8b10e3a8755a Mon Sep 17 00:00:00 2001 From: Kaitlin Newson Date: Tue, 21 Jan 2025 13:47:36 -0400 Subject: [PATCH 1/2] pkp/pkp-lib#10830 pass array to ArrayIterator in driver plugin --- plugins/generic/driver/DRIVERDAO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/generic/driver/DRIVERDAO.php b/plugins/generic/driver/DRIVERDAO.php index e35b8174043..a01577b579c 100644 --- a/plugins/generic/driver/DRIVERDAO.php +++ b/plugins/generic/driver/DRIVERDAO.php @@ -50,7 +50,7 @@ public function &getDRIVERRecordsOrIdentifiers($setIds, $from, $until, $offset, { $records = []; - $result = new \ArrayIterator($this->_getRecordsRecordSetQuery($setIds, $from, $until, null)->get()); + $result = new \ArrayIterator($this->_getRecordsRecordSetQuery($setIds, $from, $until, null)->get()->toArray()); $total = 0; for ($i = 0; $i < $offset; $i++) { From 176a37bd1d1be5f47d5db014caaae7b9e20cdda3 Mon Sep 17 00:00:00 2001 From: Kaitlin Newson Date: Tue, 21 Jan 2025 14:23:20 -0400 Subject: [PATCH 2/2] pkp/pkp-lib#10830 pass array to ArrayIterator in driver plugin with all() Co-authored-by: Jonas Raoni Soares da Silva --- plugins/generic/driver/DRIVERDAO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/generic/driver/DRIVERDAO.php b/plugins/generic/driver/DRIVERDAO.php index a01577b579c..dd1877e3327 100644 --- a/plugins/generic/driver/DRIVERDAO.php +++ b/plugins/generic/driver/DRIVERDAO.php @@ -50,7 +50,7 @@ public function &getDRIVERRecordsOrIdentifiers($setIds, $from, $until, $offset, { $records = []; - $result = new \ArrayIterator($this->_getRecordsRecordSetQuery($setIds, $from, $until, null)->get()->toArray()); + $result = new \ArrayIterator($this->_getRecordsRecordSetQuery($setIds, $from, $until, null)->get()->all()); $total = 0; for ($i = 0; $i < $offset; $i++) {