xref: /PHP-7.4/ext/mysqli/tests/bug73949.phpt (revision 782352c5)
1--TEST--
2Bug #73949 (leak in mysqli_fetch_object)
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifemb.inc');
7require_once('skipifconnectfailure.inc');
8?>
9--FILE--
10<?php
11require_once("connect.inc");
12
13class cc{
14    function __construct($c=null){
15    }
16};
17$i=mysqli_connect('p:'.$host, $user, $passwd, $db);
18$res=mysqli_query($i, "SHOW STATUS LIKE 'Connections'");
19$t=array(new stdClass);
20while($db= mysqli_fetch_object($res,'cc',$t)){}
21print "done!";
22?>
23--EXPECT--
24done!
25