bug74968.phpt 640 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Bug #74968 PHP crashes when calling mysqli_result::fetch_object with an abstract class
  3. --EXTENSIONS--
  4. mysqli
  5. --SKIPIF--
  6. <?php
  7. require_once('skipifconnectfailure.inc');
  8. ?>
  9. --FILE--
  10. <?php
  11. require_once("connect.inc");
  12. $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
  13. abstract class test {
  14. public $a;
  15. }
  16. $mysqli->query("SELECT 1 as a")->fetch_object("test");
  17. ?>
  18. ==DONE==
  19. --EXPECTF--
  20. Fatal error: Uncaught Error: Class test cannot be instantiated in %sbug74968.php:%d
  21. Stack trace:
  22. #0 %sbug74968.php(%d): mysqli_result->fetch_object('test')
  23. #1 {main}
  24. thrown in %sbug74968.php on line %d