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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC