1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Files
archived-php-src/ext/mysqli/tests/bug45940.phpt
T

19 lines
555 B
PHP

--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)"