xref: /php-src/ext/mysqli/tests/bug74547.phpt (revision a21edc52)
1--TEST--
2Bug #74547 mysqli::change_user() doesn't accept null as $database argument w/strict_types
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7  require_once 'skipifconnectfailure.inc';
8?>
9--FILE--
10<?php
11    declare(strict_types=1);
12
13    require_once 'connect.inc';
14
15    if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
16        printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
17            $host, $user, $db, $port, $socket);
18
19    var_dump(mysqli_change_user($link, $user, $passwd, NULL));
20
21    mysqli_close($link);
22?>
23--EXPECT--
24bool(true)
25