note 128996 added to ldap.examples-controls
| From: | hotmail-marksteward at main dot php dot net | Date: | Fri, 03 Nov 2023 21:48:15 +0000 |
| Subject: | note 128996 added to ldap.examples-controls | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220952@lists.php.net to get a copy of this message | ||
The pagination example is wrong as empty('0') returns true in PHP:
<?php
// Empty cookie means last page
} while (!empty($cookie));
?>
You could use this instead:
<?php
// Empty cookie means last page
} while (strlen($cookie) > 0);
?>
No idea if this breaks some other assumption though.
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.157.134 (proxied: 185.250.190.181)
----
Manual Page -- https://php.net/manual/en/ldap.examples-controls.php
Edit -- https://main.php.net/note/edit/128996
Del: integrated -- https://main.php.net/note/delete/128996/integrated
Del: useless -- https://main.php.net/note/delete/128996/useless
Del: bad code -- https://main.php.net/note/delete/128996/bad+code
Del: spam -- https://main.php.net/note/delete/128996/spam
Del: non-english -- https://main.php.net/note/delete/128996/non-english
Del: in docs -- https://main.php.net/note/delete/128996/in+docs
Del: other reasons-- https://main.php.net/note/delete/128996
Reject -- https://main.php.net/note/reject/128996
Search -- https://main.php.net/manage/user-notes.php