diff options
author | Xinchen Hui <laruence@gmail.com> | 2017-01-13 13:05:51 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2017-01-13 13:05:51 +0800 |
commit | 1cdcf5bafbb6310060780d03b2f80a00f69ef1dc (patch) | |
tree | 99f29fbb06b5d69caf79a689f80f07b4194fac56 | |
parent | c4e0ba004e13689d41bfc14b8a5110ab5114cc10 (diff) | |
parent | b25be216c1dc2f27e54b59eb19582d4a951b4c7c (diff) | |
download | php-git-1cdcf5bafbb6310060780d03b2f80a00f69ef1dc.tar.gz |
Merge branch 'PHP-7.1'
* PHP-7.1:
Remove redundant reference handling
Fixed bug #73916 (zend_print_flat_zval_r doesn't consider reference)
-rw-r--r-- | Zend/tests/bug73916.phpt | 16 | ||||
-rw-r--r-- | Zend/zend.c | 1 |
2 files changed, 16 insertions, 1 deletions
diff --git a/Zend/tests/bug73916.phpt b/Zend/tests/bug73916.phpt new file mode 100644 index 0000000000..ba2567ed0c --- /dev/null +++ b/Zend/tests/bug73916.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #73916 (zend_print_flat_zval_r doesn't consider reference) +--FILE-- +<?php +$a = array('a'); +class b{}; +$b = new b; +$test[] =& $a; +$test[] =& $b; +test($test); +function test() { + debug_print_backtrace(); +} +?> +--EXPECTF-- +#0 test(Array ([0] => Array ([0] => a),[1] => b Object ())) called at [%sbug73916.php:%d] diff --git a/Zend/zend.c b/Zend/zend.c index 3923468639..904e2cc68c 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -384,7 +384,6 @@ ZEND_API void zend_print_flat_zval_r(zval *expr) /* {{{ */ static void zend_print_zval_r_to_buf(smart_str *buf, zval *expr, int indent) /* {{{ */ { - ZVAL_DEREF(expr); switch (Z_TYPE_P(expr)) { case IS_ARRAY: smart_str_appends(buf, "Array\n"); |