summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/bug74968.phpt
blob: e3e971eb1fe8d6d2ecc0c5446f13aea1d2358d91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Bug #74968 PHP crashes when calling mysqli_result::fetch_object with an abstract class
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
    require_once("connect.inc");

    $mysqli = new mysqli("$host:$port", $user, $passwd, $db);
    abstract class test {
        public $a;
    }
    $mysqli->query("SELECT 1 as a")->fetch_object("test");
?>
==DONE==
--EXPECTF--
Fatal error: Uncaught Error: Class 'test' cannot be instantiated in %sbug74968.php:%d
Stack trace:
#0 %sbug74968.php(%d): mysqli_result->fetch_object('test')
#1 {main}
  thrown in %sbug74968.php on line %d