mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Fix bug #61697 - spl_autoload_functions returns lambda functions incorrectly
This commit is contained in:
parent
476924ec3d
commit
83ced9124e
2
NEWS
2
NEWS
@ -13,6 +13,8 @@ PHP NEWS
|
||||
- SPL:
|
||||
. Added RecursiveTreeIterator setPostfix and getPostifx methods. (Joshua
|
||||
Thijssen)
|
||||
. Fixed bug #61697 (spl_autoload_functions returns lambda functions
|
||||
incorrectly). (Laruence)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #65268 (select() implementation uses outdated tick API). (Anatol)
|
||||
|
@ -179,6 +179,9 @@ PHP 5.5 UPGRADE NOTES
|
||||
- Functions in the socket extension now do not emit warnings when the
|
||||
errno is EAGAIN, EWOULDBLOCK or EINPROGRESS.
|
||||
|
||||
- Since 5.5.2, spl_autoload_functions() returns different names for
|
||||
different lambda functions registered via spl_autoload_register().
|
||||
|
||||
========================================
|
||||
5. New Functions
|
||||
========================================
|
||||
|
@ -743,8 +743,17 @@ PHP_FUNCTION(spl_autoload_functions)
|
||||
}
|
||||
add_next_index_string(tmp, alfi->func_ptr->common.function_name, 1);
|
||||
add_next_index_zval(return_value, tmp);
|
||||
} else
|
||||
add_next_index_string(return_value, alfi->func_ptr->common.function_name, 1);
|
||||
} else {
|
||||
if (strncmp(alfi->func_ptr->common.function_name, ZEND_STRL("__lambda_func"))) {
|
||||
add_next_index_string(return_value, alfi->func_ptr->common.function_name, 1);
|
||||
} else {
|
||||
char *key;
|
||||
uint len;
|
||||
long dummy;
|
||||
zend_hash_get_current_key_ex(SPL_G(autoload_functions), &key, &len, &dummy, 0, &function_pos);
|
||||
add_next_index_stringl(return_value, key, len - 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
zend_hash_move_forward_ex(SPL_G(autoload_functions), &function_pos);
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
--TEST--
|
||||
Bug #61697 (spl_autoload_functions returns lambda functions incorrectly)
|
||||
--XFAIL--
|
||||
Bug #61697 not fixed yet
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user