mirror of
https://github.com/php/php-src.git
synced 2025-08-17 14:38:49 +02:00

We have to ensure that the attempted connection to the MySQL server fails, and do that by passing an unknown host instead of falling back to localhost.
20 lines
386 B
PHP
20 lines
386 B
PHP
--TEST--
|
|
Incomplete initialization edge case where mysql->mysql is NULL
|
|
--SKIPIF--
|
|
<?php
|
|
require_once('skipif.inc');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$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
|