]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 20 Mar 2019 11:07:05 +0000 (12:07 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 20 Mar 2019 11:07:05 +0000 (12:07 +0100)
1  2 
Zend/zend_API.c
Zend/zend_API.h
ext/standard/array.c

diff --cc Zend/zend_API.c
index ad15a38cf67c782d1e39a9b08cb8810f2f416d37,881ee27a031e699a77a87c4044622952576b7383..00161da07ee95c04a1644972ea9a8dee3a0a626d
@@@ -2792,10 -2907,13 +2792,10 @@@ static int zend_is_callable_check_class
  }
  /* }}} */
  
static void free_fcc(zend_fcall_info_cache *fcc) {
ZEND_API void zend_release_fcall_info_cache(zend_fcall_info_cache *fcc) {
        if (fcc->function_handler &&
 -              ((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) ||
 -               fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
 -               fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
 -              if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
 -                      fcc->function_handler->common.function_name) {
 +              (fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) {
 +              if (fcc->function_handler->common.function_name) {
                        zend_string_release_ex(fcc->function_handler->common.function_name, 0);
                }
                zend_free_trampoline(fcc->function_handler);
@@@ -3208,10 -3350,10 +3209,10 @@@ check_func
                        }
                        return 0;
                case IS_OBJECT:
 -                      if (Z_OBJ_HANDLER_P(callable, get_closure) && Z_OBJ_HANDLER_P(callable, get_closure)(callable, &fcc->calling_scope, &fcc->function_handler, &fcc->object) == SUCCESS) {
 +                      if (Z_OBJ_HANDLER_P(callable, get_closure) && Z_OBJ_HANDLER_P(callable, get_closure)(Z_OBJ_P(callable), &fcc->calling_scope, &fcc->function_handler, &fcc->object) == SUCCESS) {
                                fcc->called_scope = fcc->calling_scope;
                                if (fcc == &fcc_local) {
-                                       free_fcc(fcc);
+                                       zend_release_fcall_info_cache(fcc);
                                }
                                return 1;
                        }
diff --cc Zend/zend_API.h
index 04cd0fbf3c536f7d5553a1a422a29e92089ad4d4,00a39f6624348bb976a94ce18d4858e2971da973..30b24d10af3890de7722fe61b1c78e2cf5da86dd
@@@ -297,8 -297,12 +297,9 @@@ ZEND_API ZEND_COLD void zend_wrong_para
  
  #define IS_CALLABLE_CHECK_SYNTAX_ONLY (1<<0)
  #define IS_CALLABLE_CHECK_NO_ACCESS   (1<<1)
 -#define IS_CALLABLE_CHECK_IS_STATIC   (1<<2)
  #define IS_CALLABLE_CHECK_SILENT      (1<<3)
  
 -#define IS_CALLABLE_STRICT  (IS_CALLABLE_CHECK_IS_STATIC)
 -
+ ZEND_API void zend_release_fcall_info_cache(zend_fcall_info_cache *fcc);
  ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *object);
  ZEND_API zend_string *zend_get_callable_name(zval *callable);
  ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error);
Simple merge