|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74547 mysqli::change_user() doesn't accept null as $database argument w/strict_types
Submitted: 2017-05-05 14:36 UTC Modified: 2017-05-06 13:08 UTC
From: vedad at kajtaz dot net Assigned:
Status: Closed Package: MySQLi related
PHP Version: 7.1.4 OS: FreeBSD 11.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
4 + 8 = ?
Subscribe to this entry?

 [2017-05-05 14:36 UTC] vedad at kajtaz dot net
The mysqli::change_user() documentation states: "If desired, the NULL value may be passed resulting in only changing the user and not selecting a database".

However, in 'strict_types=1' mode, the following exception is thrown when null is provided:

Fatal error: Uncaught TypeError: mysqli::change_user() expects parameter 3 to be string, null given in ... on line ...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-05-06 13:08 UTC]
-Type: Documentation Problem +Type: Bug
 [2017-05-06 13:11 UTC]
Automatic comment on behalf of ab
Log: Fixed bug #74547 mysqli::change_user() doesn't accept null as $database argument w/strict_types
 [2017-05-06 13:11 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 22 11:01:28 2024 UTC