@@ -100,7 +100,7 @@ public function execute()
100
100
$ cookie = '' ;
101
101
do {
102
102
if ($ pageControl ) {
103
- $ this ->controlPagedResult ($ con , $ pageSize , $ cookie );
103
+ $ this ->controlPagedResult ($ con , $ pageSize , true , $ cookie );
104
104
}
105
105
$ sizeLimit = $ itemsLeft ;
106
106
if ($ pageSize > 0 && $ sizeLimit >= $ pageSize ) {
@@ -174,7 +174,7 @@ public function getResources(): array
174
174
private function resetPagination ()
175
175
{
176
176
$ con = $ this ->connection ->getResource ();
177
- $ this ->controlPagedResult ($ con , 0 , '' );
177
+ $this ->controlPagedResult ($ con , 0 , false , '' );
178
178
$ this ->serverctrls = [];
179
179
180
180
// This is a workaround for a bit of a bug in the above invocation
@@ -204,15 +204,15 @@ private function resetPagination()
204
204
*
205
205
* @param resource $con
206
206
*/
207
- private function controlPagedResult ($ con , int $ pageSize , string $ cookie ): bool
207
+ private function controlPagedResult ($ con , int $ pageSize , bool $ critical , string $ cookie ): bool
208
208
{
209
209
if (\PHP_VERSION_ID < 70300 ) {
210
- return ldap_control_paged_result ($ con , $ pageSize , true , $ cookie );
210
+ return ldap_control_paged_result ($ con , $ pageSize , $ critical , $ cookie );
211
211
}
212
212
$ this ->serverctrls = [
213
213
[
214
214
'oid ' => \LDAP_CONTROL_PAGEDRESULTS ,
215
- 'isCritical ' => true ,
215
+ 'isCritical ' => $ critical ,
216
216
'value ' => [
217
217
'size ' => $ pageSize ,
218
218
'cookie ' => $ cookie ,
0 commit comments