Fixed return-by-reference from internal functions

This commit is contained in:
Dmitry Stogov 2005-08-24 10:41:06 +00:00
parent 9e0ed1cb67
commit 19dc0411f7
2 changed files with 4 additions and 0 deletions

View File

@ -1852,6 +1852,8 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
*/
if (!return_value_used) {
zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
} else {
EX_T(opline->result.u.var).var.fcall_returned_reference = EX(function_state).function->common.return_reference;
}
} else if (EX(function_state).function->type == ZEND_USER_FUNCTION) {
HashTable *calling_symbol_table;

View File

@ -197,6 +197,8 @@ static int zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
*/
if (!return_value_used) {
zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
} else {
EX_T(opline->result.u.var).var.fcall_returned_reference = EX(function_state).function->common.return_reference;
}
} else if (EX(function_state).function->type == ZEND_USER_FUNCTION) {
HashTable *calling_symbol_table;