Unwrap reference returns in cufa etc

This commit is contained in:
Nikita Popov 2016-09-30 22:08:08 +02:00
parent e63443d825
commit 02ba9d71ab
4 changed files with 63 additions and 0 deletions

View file

@ -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);
}
}