summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/mysqli_incomplete_initialization.phpt
blob: 399ad74274f970b5e2ec575f1786cea3631db492 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Incomplete initialization edge case where mysql->mysql is NULL
--SKIPIF--
<?php
require_once('skipif.inc');
?>
--FILE--
<?php

mysqli_report(MYSQLI_REPORT_OFF);
$mysqli = new mysqli();
@$mysqli->__construct('doesnotexist');
$mysqli->close();

?>
--EXPECTF--
Fatal error: Uncaught Error: mysqli object is not fully initialized in %s:%d
Stack trace:
#0 %s(%d): mysqli->close()
#1 {main}
  thrown in %s on line %d