summaryrefslogtreecommitdiff
path: root/ext/reflection
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2016-09-30 22:08:08 +0200
committerNikita Popov <nikic@php.net>2016-09-30 22:10:01 +0200
commit02ba9d71abc9f830fc9707eb2a7daabf37298f7d (patch)
tree34cc2775549627b27367fb4ca9da7b495c7cc7f7 /ext/reflection
parente63443d8251227df26d9ca114f1bc8e7c0f1651f (diff)
downloadphp-git-02ba9d71abc9f830fc9707eb2a7daabf37298f7d.tar.gz
Unwrap reference returns in cufa etc
Diffstat (limited to 'ext/reflection')
-rw-r--r--ext/reflection/php_reflection.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 52d35409d3..9ecb04d461 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1985,6 +1985,9 @@ ZEND_METHOD(reflection_function, invoke)
}
if (Z_TYPE(retval) != IS_UNDEF) {
+ if (Z_ISREF(retval)) {
+ zend_unwrap_reference(&retval);
+ }
ZVAL_COPY_VALUE(return_value, &retval);
}
}
@@ -2048,6 +2051,9 @@ ZEND_METHOD(reflection_function, invokeArgs)
}
if (Z_TYPE(retval) != IS_UNDEF) {
+ if (Z_ISREF(retval)) {
+ zend_unwrap_reference(&retval);
+ }
ZVAL_COPY_VALUE(return_value, &retval);
}
}
@@ -3323,6 +3329,9 @@ static void reflection_method_invoke(INTERNAL_FUNCTION_PARAMETERS, int variadic)
}
if (Z_TYPE(retval) != IS_UNDEF) {
+ if (Z_ISREF(retval)) {
+ zend_unwrap_reference(&retval);
+ }
ZVAL_COPY_VALUE(return_value, &retval);
}
}