summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/bug45940.phpt
blob: 5a8b6bb048420791a51148393f85ccb24660b925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Bug #45940 MySQLI OO does not populate connect_error property on failed connect
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
include "connect.inc";

//a forced username/password mismatch
$dbo = @new mysqli($host, 'hopenotexist', 'andifheexistshehasanotherpassword', 'my_db');

var_dump($dbo->connect_error);
var_dump(mysqli_connect_error());
?>
--EXPECTF--
string(71) "Access denied for user 'hopenotexist'@'localhost' (using password: YES)"
string(71) "Access denied for user 'hopenotexist'@'localhost' (using password: YES)"