summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-05-03 19:27:04 +0300
committerDmitry Stogov <dmitry@zend.com>2018-05-03 19:27:04 +0300
commiteafa92ba9d315106dede5aa154f81d0a4b34fe57 (patch)
treef41dd0d7576592548fe636034ed2986eb3bb62e0 /ext
parentfdb347a7539bde2c02b7efaae25583581c77b88e (diff)
downloadphp-git-eafa92ba9d315106dede5aa154f81d0a4b34fe57.tar.gz
zend_fcall_info_cache.calling_scope is not used by zend_call_function() and doesn't have to be initialized.
It's used only as a result of zend_is_callable() in forward_static_call and spl_autoload.
Diffstat (limited to 'ext')
-rw-r--r--ext/mysqli/mysqli.c1
-rw-r--r--ext/pdo/pdo_dbh.c1
-rw-r--r--ext/pdo/pdo_stmt.c1
-rw-r--r--ext/pgsql/pgsql.c1
-rw-r--r--ext/reflection/php_reflection.c6
-rw-r--r--ext/spl/php_spl.c1
-rw-r--r--ext/spl/spl_directory.c1
-rw-r--r--ext/spl/spl_engine.h1
8 files changed, 0 insertions, 13 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 83e956ebdf..0c97ec33e8 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -1304,7 +1304,6 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
}
fcc.function_handler = ce->constructor;
- fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(return_value);
fcc.object = Z_OBJ_P(return_value);
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 5f6dc6cdc6..e78baea762 100644
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -443,7 +443,6 @@ static void pdo_stmt_construct(zend_execute_data *execute_data, pdo_stmt_t *stmt
zend_fcall_info_args(&fci, ctor_args);
fcc.function_handler = dbstmt_ce->constructor;
- fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(object);
fcc.object = Z_OBJ_P(object);
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 777736095a..01c429c8ce 100644
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -732,7 +732,6 @@ static int do_fetch_class_prepare(pdo_stmt_t *stmt) /* {{{ */
zend_fcall_info_args_ex(fci, ce->constructor, &stmt->fetch.cls.ctor_args);
fcc->function_handler = ce->constructor;
- fcc->calling_scope = zend_get_executed_scope();
fcc->called_scope = ce;
return 1;
} else if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) {
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index dccdfc2e9a..81a1bdbb3c 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -2831,7 +2831,6 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
}
fcc.function_handler = ce->constructor;
- fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(return_value);
fcc.object = Z_OBJ_P(return_value);
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 42e4ee3c53..391183addf 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1354,7 +1354,6 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
fci.no_separation = 1;
fcc.function_handler = ce_ptr->constructor;
- fcc.calling_scope = ce_ptr;
fcc.called_scope = Z_OBJCE(reflector);
fcc.object = Z_OBJ(reflector);
@@ -1880,7 +1879,6 @@ ZEND_METHOD(reflection_function, invoke)
fci.no_separation = 1;
fcc.function_handler = fptr;
- fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = NULL;
fcc.object = NULL;
@@ -1940,7 +1938,6 @@ ZEND_METHOD(reflection_function, invokeArgs)
fci.no_separation = 1;
fcc.function_handler = fptr;
- fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = NULL;
fcc.object = NULL;
@@ -3198,7 +3195,6 @@ static void reflection_method_invoke(INTERNAL_FUNCTION_PARAMETERS, int variadic)
fci.no_separation = 1;
fcc.function_handler = mptr;
- fcc.calling_scope = obj_ce;
fcc.called_scope = intern->ce;
fcc.object = object ? Z_OBJ_P(object) : NULL;
@@ -4758,7 +4754,6 @@ ZEND_METHOD(reflection_class, newInstance)
fci.no_separation = 1;
fcc.function_handler = constructor;
- fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(return_value);
fcc.object = Z_OBJ_P(return_value);
@@ -4859,7 +4854,6 @@ ZEND_METHOD(reflection_class, newInstanceArgs)
fci.no_separation = 1;
fcc.function_handler = constructor;
- fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = Z_OBJCE_P(return_value);
fcc.object = Z_OBJ_P(return_value);
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index 0c1f6c7b40..2ae1d0de9a 100644
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -431,7 +431,6 @@ PHP_FUNCTION(spl_autoload_call)
if (Z_ISUNDEF(alfi->obj)) {
fci.object = NULL;
fcic.object = NULL;
- fcic.calling_scope = alfi->ce;
if (alfi->ce &&
(!called_scope ||
!instanceof_function(called_scope, alfi->ce))) {
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 9e21f8d5af..56e51dfe5b 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -2085,7 +2085,6 @@ static int spl_filesystem_file_call(spl_filesystem_object *intern, zend_function
ZVAL_STR(&fci.function_name, func_ptr->common.function_name);
fcic.function_handler = func_ptr;
- fcic.calling_scope = NULL;
fcic.called_scope = NULL;
fcic.object = NULL;
diff --git a/ext/spl/spl_engine.h b/ext/spl/spl_engine.h
index cbfd644b46..9ff67a0cef 100644
--- a/ext/spl/spl_engine.h
+++ b/ext/spl/spl_engine.h
@@ -70,7 +70,6 @@ static inline void spl_instantiate_arg_n(zend_class_entry *pce, zval *retval, in
fci.no_separation = 1;
fcc.function_handler = func;
- fcc.calling_scope = zend_get_executed_scope();
fcc.called_scope = pce;
fcc.object = Z_OBJ_P(retval);