php.net |  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vedad at kajtaz dot net
New email:
PHP Version: OS:

 

 [2017-05-05 14:36 UTC] vedad at kajtaz dot net
Description:
------------
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 ...


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-05-06 13:08 UTC] ab@php.net
-Type: Documentation Problem +Type: Bug
 [2017-05-06 13:11 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=561f1afe6ec3e1c551dba657a77ad948065c5e95
Log: Fixed bug #74547 mysqli::change_user() doesn't accept null as $database argument w/strict_types
 [2017-05-06 13:11 UTC] ab@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Jun 18 11:01:59 2018 UTC