mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-7.1'
* PHP-7.1: Remove redundant reference handling Fixed bug #73916 (zend_print_flat_zval_r doesn't consider reference)
This commit is contained in:
commit
1cdcf5bafb
2 changed files with 16 additions and 1 deletions
16
Zend/tests/bug73916.phpt
Normal file
16
Zend/tests/bug73916.phpt
Normal file
|
@ -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]
|
|
@ -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) /* {{{ */
|
static void zend_print_zval_r_to_buf(smart_str *buf, zval *expr, int indent) /* {{{ */
|
||||||
{
|
{
|
||||||
ZVAL_DEREF(expr);
|
|
||||||
switch (Z_TYPE_P(expr)) {
|
switch (Z_TYPE_P(expr)) {
|
||||||
case IS_ARRAY:
|
case IS_ARRAY:
|
||||||
smart_str_appends(buf, "Array\n");
|
smart_str_appends(buf, "Array\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue