Annotation of embedaddon/php/ext/mysqli/tests/bug46614.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #46614 (Extended MySQLi class gives incorrect empty() result)
! 3: --SKIPIF--
! 4: <?php
! 5: require_once('skipif.inc');
! 6: require_once('skipifconnectfailure.inc');
! 7: if (!defined("MYSQLI_ASYNC")) {
! 8: die("skip mysqlnd only");
! 9: }
! 10: ?>
! 11: --FILE--
! 12: <?php
! 13: class MySQL_Ext extends mysqli{
! 14: protected $fooData = array();
! 15:
! 16: public function isEmpty()
! 17: {
! 18: $this->extData[] = 'Bar';
! 19: return empty($this->extData);
! 20: }
! 21: }
! 22:
! 23: include ("connect.inc");
! 24: $MySQL_Ext = new MySQL_Ext($host, $user, $passwd, $db, $port, $socket);
! 25:
! 26: $isEmpty = $MySQL_Ext->isEmpty();
! 27: var_dump($isEmpty);
! 28: ?>
! 29: --EXPECT--
! 30: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>