summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-03-05 01:54:21 +0400
committerDmitry Stogov <dmitry@zend.com>2014-03-05 01:54:21 +0400
commit19670c2bbcd5fc1339e160929cc81db3ae940392 (patch)
tree5d9175374626313f3a16b0bf27334fbd6dd7cf55 /ext/reflection/php_reflection.c
parentdb7b5325f08f706b311d69cb204f4ea8b6bd0356 (diff)
downloadphp-git-19670c2bbcd5fc1339e160929cc81db3ae940392.tar.gz
Fixied calling object closures from internal functions
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 032bee2283..3c74ff75ba 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1388,7 +1388,7 @@ static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *c
fcc.function_handler = ce_ptr->constructor;
fcc.calling_scope = ce_ptr;
fcc.called_scope = Z_OBJCE(reflector);
- fcc.object_ptr = &reflector;
+ ZVAL_COPY_VALUE(&fcc.object, &reflector);
result = zend_call_function(&fci, &fcc TSRMLS_CC);
@@ -1904,7 +1904,7 @@ ZEND_METHOD(reflection_function, invoke)
fcc.function_handler = fptr;
fcc.calling_scope = EG(scope);
fcc.called_scope = NULL;
- fcc.object_ptr = NULL;
+ ZVAL_UNDEF(&fcc.object);
result = zend_call_function(&fci, &fcc TSRMLS_CC);
@@ -1972,7 +1972,7 @@ ZEND_METHOD(reflection_function, invokeArgs)
fcc.function_handler = fptr;
fcc.calling_scope = EG(scope);
fcc.called_scope = NULL;
- fcc.object_ptr = NULL;
+ ZVAL_UNDEF(&fcc.object);
result = zend_call_function(&fci, &fcc TSRMLS_CC);
@@ -2886,7 +2886,7 @@ ZEND_METHOD(reflection_method, invoke)
fcc.function_handler = mptr;
fcc.calling_scope = obj_ce;
fcc.called_scope = intern->ce;
- fcc.object_ptr = &object;
+ ZVAL_COPY_VALUE(&fcc.object, &object);
result = zend_call_function(&fci, &fcc TSRMLS_CC);
@@ -2995,7 +2995,7 @@ ZEND_METHOD(reflection_method, invokeArgs)
fcc.function_handler = mptr;
fcc.calling_scope = obj_ce;
fcc.called_scope = intern->ce;
- fcc.object_ptr = object;
+ ZVAL_COPY_VALUE(&fcc.object, object);
/*
* Copy the zend_function when calling via handler (e.g. Closure::__invoke())
@@ -4228,7 +4228,7 @@ ZEND_METHOD(reflection_class, newInstance)
fcc.function_handler = constructor;
fcc.calling_scope = EG(scope);
fcc.called_scope = Z_OBJCE_P(return_value);
- fcc.object_ptr = return_value;
+ ZVAL_COPY_VALUE(&fcc.object, return_value);
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
if (params) {
@@ -4333,7 +4333,7 @@ ZEND_METHOD(reflection_class, newInstanceArgs)
fcc.function_handler = constructor;
fcc.calling_scope = EG(scope);
fcc.called_scope = Z_OBJCE_P(return_value);
- fcc.object_ptr = return_value;
+ ZVAL_COPY_VALUE(&fcc.object, return_value);
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
if (params) {