1 diff -up php-5.2.17/Zend/zend_execute_API.c.bug-60138 php-5.2.17/Zend/zend_execute_API.c
2 --- php-5.2.17/Zend/zend_execute_API.c.bug-60138 2012-01-12 09:18:41.000000000 +0700
3 +++ php-5.2.17/Zend/zend_execute_API.c 2012-01-12 09:19:13.000000000 +0700
4 @@ -935,10 +935,11 @@ int zend_call_function(zend_fcall_info *
5 && (EX(function_state).function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) == 0
6 && !ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i + 1)
7 && PZVAL_IS_REF(*fci->params[i])) {
8 - SEPARATE_ZVAL(fci->params[i]);
11 - if (ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i+1)
13 + *param = **(fci->params[i]);
15 + zval_copy_ctor(param);
16 + } else if (ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i + 1)
17 && !PZVAL_IS_REF(*fci->params[i])) {
18 if ((*fci->params[i])->refcount>1) {