8000 Fix critical extension when reseting paged control · symfony/symfony@a2b7476 · GitHub
[go: up one dir, main page]

Skip to content

Commit a2b7476

Browse files
committed
Fix critical extension when reseting paged control
1 parent 091265b commit a2b7476

File tree

1 file changed

+5
-5
lines changed
  • src/Symfony/Component/Ldap/Adapter/ExtLdap

1 file changed

+5
-5
lines changed

src/Symfony/Component/Ldap/Adapter/ExtLdap/Query.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function execute()
100100
$cookie = '';
101101
do {
102102
if ($pageControl) {
103-
$this->controlPagedResult($con, $pageSize, $cookie);
103+
$this->controlPagedResult($con, $pageSize, true, $cookie);
104104
}
105105
$sizeLimit = $itemsLeft;
106106
if ($pageSize > 0 && $sizeLimit >= $pageSize) {
@@ -174,7 +174,7 @@ public function getResources(): array
174174
private function resetPagination()
175175
{
176176
$con = $this->connection->getResource();
177-
$this->controlPagedResult($con, 0, '');
177+
$this->controlPagedResult($con, 0, false, '');
178178
$this->serverctrls = [];
179179

180180
// This is a workaround for a bit of a bug in the above invocation
@@ -204,15 +204,15 @@ private function resetPagination()
204204
*
205205
* @param resource $con
206206
*/
207-
private function controlPagedResult($con, int $pageSize, string $cookie): bool
207+
private function controlPagedResult($con, int $pageSize, bool $critical, string $cookie): bool
208208
{
209209
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);
211211
}
212212
$this->serverctrls = [
213213
[
214214
'oid' => \LDAP_CONTROL_PAGEDRESULTS,
215-
'isCritical' => true,
215+
'isCritical' => $critical,
216216
'value' => [
217217
'size' => $pageSize,
218218
'cookie' => $cookie,

0 commit comments

Comments
 (0)
0