# [PATCH] ext/ldap: PHP 6 & bug #48441

- Thread: https://externals.io/message/44204
- Original archive: https://news-web.php.net/php.internals/44204
- Started by Patrick ALLAERT on 2009-06-08T13:11:04+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #44204 — Patrick ALLAERT — 2009-06-08T13:11:04+00:00

URL: https://externals.io/message/44204#44204

Hello list,

I'd like to adapt ext/ldap for
(1) PHP 6
(2) bug #48441.
I also have at my disposal more than 80 phpt tests files for ext/ldap
that I will commit too.

In order to address this issues I'd like to have your review on the
following patches before I commit them:

(a) Refactoring of php_ldap_do_search() which also simplifies (b) and (c):
- Common cleanup section at the end of the function to avoid
duplicating cleaning logic.
- Logic specific to parallel/non-parallel search implemented inside
*one* "if (parallel search) {...} else {...}" block.
Patch:
http://87.98.252.90/01-ldap_refactor.patch.txt
http://87.98.252.90/01-ldap_refactor.patch.ignoreSpaceChanges.txt
(diff -bB version, easier for review-only)

(b) Converting ext/ldap to work with PHP 6:
Patch:
http://87.98.252.90/02-ldap_unicode.patch.txt

(c) Fixing #48441:
Patch:
http://87.98.252.90/03-ldap_bug48441.patch.txt

All of them should be committed to HEAD
(a) and (c) should be committed in addition to PHP_5_3 and PHP_5_2
(with adaptations).

You can test them with:
http://testfest.php.net/repos/testfest/BelgiumUG/ext/ldap/tests/

Thanks for your feedback :)

Cheers,
-- 
Patrick Allaert
---
http://patrickallaert.blogspot.com/
http://code.google.com/p/peclapm/ - Alternative PHP Monitor

---

## #44205 — Kalle Sommer Nielsen — 2009-06-08T13:36:49+00:00

URL: https://externals.io/message/44204#44205 · In reply to: #44204

Hi Patrick

2009/6/8 Patrick ALLAERT <patrickallaert@php.net>:
> (b) Converting ext/ldap to work with PHP 6:
> Patch:
> http://87.98.252.90/02-ldap_unicode.patch.txt

You may want to add the "U" modifier in the function protos to
identify they work under Unicode, and so they will show up as "Safe"
here:
http://www.php.net/~scoates/unicode/

> Cheers,
> --
> Patrick Allaert
> ---
> http://patrickallaert.blogspot.com/
> http://code.google.com/p/peclapm/ - Alternative PHP Monitor
>
> --
> 
> 
>
>



-- 
regrads,

Kalle Sommer Nielsen
kalle@php.net
