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(),