bug46614.phpt 600 B

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