Skip to content

Commit 667e9bd

Browse files
author
Côme Bernigaud
committed
Deprecating ldap_sort the right way
1 parent 66031cf commit 667e9bd

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

ext/ldap/ldap.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,8 +2001,6 @@ PHP_FUNCTION(ldap_sort)
20012001
size_t sflen;
20022002
zend_resource *le;
20032003

2004-
php_error_docref(NULL, E_DEPRECATED, "Usage of ldap_sort is deprecated and will be removed in one of the next PHP-versions");
2005-
20062004
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrs", &link, &result, &sortfilter, &sflen) != SUCCESS) {
20072005
RETURN_FALSE;
20082006
}
@@ -3279,7 +3277,7 @@ const zend_function_entry ldap_functions[] = {
32793277
PHP_FE(ldap_err2str, arginfo_ldap_err2str)
32803278
PHP_FE(ldap_error, arginfo_ldap_resource)
32813279
PHP_FE(ldap_compare, arginfo_ldap_compare)
3282-
PHP_FE(ldap_sort, arginfo_ldap_sort)
3280+
PHP_DEP_FE(ldap_sort, arginfo_ldap_sort)
32833281

32843282
#if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP
32853283
PHP_FE(ldap_rename, arginfo_ldap_rename)

ext/ldap/tests/ldap_sort_basic.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ldap_delete($link, "cn=userE,$base");
5151
remove_dummy_data($link, $base);
5252
?>
5353
--EXPECTF--
54-
Deprecated: ldap_sort(): Usage of ldap_sort is deprecated and will be removed in one of the next PHP-versions in %s.php on line %d
54+
Deprecated: Function ldap_sort() is deprecated in %s.php on line %d
5555
bool(true)
5656
array(7) {
5757
["count"]=>

ext/ldap/tests/ldap_sort_error.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,27 @@ var_dump(ldap_sort($link, $link, "sn"));
1818
?>
1919
===DONE===
2020
--EXPECTF--
21-
Deprecated: ldap_sort(): Usage of ldap_sort is deprecated and will be removed in one of the next PHP-versions in %s.php on line %d
21+
Deprecated: Function ldap_sort() is deprecated in %s.php on line %d
2222

2323
Warning: ldap_sort() expects exactly 3 parameters, 1 given in %s on line %d
2424
bool(false)
2525

26-
Deprecated: ldap_sort(): Usage of ldap_sort is deprecated and will be removed in one of the next PHP-versions in %s.php on line %d
26+
Deprecated: Function ldap_sort() is deprecated in %s.php on line %d
2727

2828
Warning: ldap_sort() expects exactly 3 parameters, 2 given in %s on line %d
2929
bool(false)
3030

31-
Deprecated: ldap_sort(): Usage of ldap_sort is deprecated and will be removed in one of the next PHP-versions in %s.php on line %d
31+
Deprecated: Function ldap_sort() is deprecated in %s.php on line %d
3232

3333
Warning: ldap_sort() expects exactly 3 parameters, 4 given in %s on line %d
3434
bool(false)
3535

36-
Deprecated: ldap_sort(): Usage of ldap_sort is deprecated and will be removed in one of the next PHP-versions in %s.php on line %d
36+
Deprecated: Function ldap_sort() is deprecated in %s.php on line %d
3737

3838
Warning: ldap_sort() expects parameter 3 to be %binary_string_optional%, resource given in %s on line %d
3939
bool(false)
4040

41-
Deprecated: ldap_sort(): Usage of ldap_sort is deprecated and will be removed in one of the next PHP-versions in %s.php on line %d
41+
Deprecated: Function ldap_sort() is deprecated in %s.php on line %d
4242

4343
Warning: ldap_sort(): Supplied resource is not a valid ldap result resource in %s on line %d
4444
bool(false)

ext/ldap/tests/ldap_sort_variation.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ldap_delete($link, "cn=userE,$base");
5151
remove_dummy_data($link, $base);
5252
?>
5353
--EXPECTF--
54-
Deprecated: ldap_sort(): Usage of ldap_sort is deprecated and will be removed in one of the next PHP-versions in %s.php on line %d
54+
Deprecated: Function ldap_sort() is deprecated in %s.php on line %d
5555
bool(true)
5656
array(7) {
5757
["count"]=>

0 commit comments

Comments
 (0)