File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ PHP NEWS
25
25
- Opcache:
26
26
. Fixed bug #79643 (PHP with Opcache crashes when a file with specific name
27
27
is included). (twosee)
28
+ . Fixed run-time binding of preloaded dynamically declared function. (Dmitry)
28
29
29
30
- OpenSSL:
30
31
. Fixed bug #79983 (openssl_encrypt / openssl_decrypt fail with OCB mode).
Original file line number Diff line number Diff line change @@ -1050,7 +1050,11 @@ ZEND_API int do_bind_function(zval *lcname) /* {{{ */
1050
1050
return FAILURE ;
1051
1051
}
1052
1052
function = (zend_function * )Z_PTR_P (zv );
1053
- zv = zend_hash_set_bucket_key (EG (function_table ), (Bucket * )zv , Z_STR_P (lcname ));
1053
+ if (UNEXPECTED (function -> common .fn_flags & ZEND_ACC_PRELOADED )) {
1054
+ zv = zend_hash_add (EG (function_table ), Z_STR_P (lcname ), zv );
1055
+ } else {
1056
+ zv = zend_hash_set_bucket_key (EG (function_table ), (Bucket * )zv , Z_STR_P (lcname ));
1057
+ }
1054
1058
if (UNEXPECTED (!zv )) {
1055
1059
do_bind_function_error (Z_STR_P (lcname ), & function -> op_array , 0 );
1056
1060
return FAILURE ;
You can’t perform that action at this time.
0 commit comments