1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00

Correct LDAP paging example (#2910)

empty('0') is true in PHP, but $cookie is an opaque string.
strlen should work in all the same places, but also for '0' (e.g. python-ldapserver returns this for the first response to every query).
This commit is contained in:
Mark Steward
2023-11-04 14:15:57 +00:00
committed by GitHub
parent a55792ff57
commit 39899ee59d

View File

@@ -198,7 +198,7 @@ do {
$cookie = '';
}
// Empty cookie means last page
} while (!empty($cookie));
} while (strlen($cookie) > 0);
?>
]]>
</programlisting>