php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch pass-by-ref-recv-init.patch for *General Issues Bug #66331

Patch version 2013-12-20 16:06 UTC

Return to Bug #66331 | Download this patch
Patch Revisions:

Developer: krakjoe@php.net

diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index c61f3a2..b93c2fa 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -1881,6 +1881,10 @@ void zend_do_receive_param(zend_uchar op, znode *varname, const znode *initializ
 		op = ZEND_RECV_VARIADIC;
 		CG(active_op_array)->fn_flags |= ZEND_ACC_VARIADIC;
 	}
+	
+	if((pass_by_reference == 1) && (op == ZEND_RECV_INIT)) {
+		pass_by_reference = 2;
+	}
 
 	opline = get_next_op(CG(active_op_array) TSRMLS_CC);
 	CG(active_op_array)->num_args++;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 04:01:28 2024 UTC