Skip to content

Commit 04379bc

Browse files
committed
Fixed bug #73916 (zend_print_flat_zval_r doesn't consider reference)
1 parent bd75f9e commit 04379bc

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

NEWS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ PHP NEWS
33
?? ??? 2017 PHP 7.0.16
44

55
- Core:
6+
. Fixed bug #73916 (zend_print_flat_zval_r doesn't consider reference).
7+
(Laruence)
68
. Fixed bug #73876 (Crash when exporting **= in expansion of assign op).
7-
(Sara)
9+
(Sara)
810

911
- FPM:
1012
. Fixed bug #67583 (double fastcgi_end_request on max_children limit).

Zend/tests/bug73916.phpt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
Bug #73916 (zend_print_flat_zval_r doesn't consider reference)
3+
--FILE--
4+
<?php
5+
$a = array('a');
6+
class b{};
7+
$b = new b;
8+
$test[] =& $a;
9+
$test[] =& $b;
10+
test($test);
11+
function test() {
12+
debug_print_backtrace();
13+
}
14+
?>
15+
--EXPECTF--
16+
#0 test(Array ([0] => Array ([0] => a),[1] => b Object ())) called at [%sbug73916.php:%d]

Zend/zend.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ ZEND_API void zend_print_flat_zval_r(zval *expr) /* {{{ */
312312
ZEND_PUTS(")");
313313
break;
314314
}
315+
case IS_REFERENCE:
316+
zend_print_flat_zval_r(Z_REFVAL_P(expr));
317+
break;
315318
default:
316319
zend_print_variable(expr);
317320
break;

0 commit comments

Comments
 (0)