From dcb5ff83e23c12ad72d8dc2192f2df0d524311a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B4nathas=20Pizzolato=20Ribeiro?= Date: Fri, 30 Jun 2023 23:26:29 -0300 Subject: [PATCH] :bug: fix(Builder): adding option only exists controls --- src/Query/Builder.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Query/Builder.php b/src/Query/Builder.php index e0123eff..ab73ab29 100644 --- a/src/Query/Builder.php +++ b/src/Query/Builder.php @@ -382,7 +382,7 @@ public function query($query) * * @return Collection|array */ - public function paginate($pageSize = 5000, $isCritical = true) + public function paginate($pageSize = 1000, $isCritical = true) { $this->paginated = true; @@ -483,7 +483,9 @@ protected function run($filter) // Before running the query, we will set the LDAP server controls. This // allows the controls to be automatically reset upon each new query // that is conducted on the same connection during each request. - // $ldap->setOption(LDAP_OPT_SERVER_CONTROLS, $this->controls); + if (count($this->controls) > 0) { + $ldap->setOption(LDAP_OPT_SERVER_CONTROLS, $this->controls); + } return $ldap->{$this->type}( $this->getDn(),