bug46614.phpt 579 B

123456789101112131415161718192021222324252627282930
  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. public function isEmpty()
  16. {
  17. $this->extData[] = 'Bar';
  18. return empty($this->extData);
  19. }
  20. }
  21. include ("connect.inc");
  22. $MySQL_Ext = new MySQL_Ext($host, $user, $passwd, $db, $port, $socket);
  23. $isEmpty = $MySQL_Ext->isEmpty();
  24. var_dump($isEmpty);
  25. ?>
  26. --EXPECT--
  27. bool(false)