mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Fixed run-time binding of preloaded dynamically declared function
This commit is contained in:
parent
990bb34891
commit
68f80be9d1
1
NEWS
1
NEWS
@ -25,6 +25,7 @@ PHP NEWS
|
||||
- Opcache:
|
||||
. Fixed bug #79643 (PHP with Opcache crashes when a file with specific name
|
||||
is included). (twosee)
|
||||
. Fixed run-time binding of preloaded dynamically declared function. (Dmitry)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #79983 (openssl_encrypt / openssl_decrypt fail with OCB mode).
|
||||
|
@ -1050,7 +1050,11 @@ ZEND_API int do_bind_function(zval *lcname) /* {{{ */
|
||||
return FAILURE;
|
||||
}
|
||||
function = (zend_function*)Z_PTR_P(zv);
|
||||
zv = zend_hash_set_bucket_key(EG(function_table), (Bucket*)zv, Z_STR_P(lcname));
|
||||
if (UNEXPECTED(function->common.fn_flags & ZEND_ACC_PRELOADED)) {
|
||||
zv = zend_hash_add(EG(function_table), Z_STR_P(lcname), zv);
|
||||
} else {
|
||||
zv = zend_hash_set_bucket_key(EG(function_table), (Bucket*)zv, Z_STR_P(lcname));
|
||||
}
|
||||
if (UNEXPECTED(!zv)) {
|
||||
do_bind_function_error(Z_STR_P(lcname), &function->op_array, 0);
|
||||
return FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user