Bug #74547 [Opn->Csd]: mysqli::change_user() doesn't accept null as $database argument w/strict_types

From: Date: Sat, 06 May 2017 13:11:58 +0000
Subject: Bug #74547 [Opn->Csd]: mysqli::change_user() doesn't accept null as $database argument w/strict_types
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208969@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74547&edit=1 ID: 74547 Updated by: ab@php.net Reported by: vedad at kajtaz dot net Summary: mysqli::change_user() doesn't accept null as $database argument w/strict_types -Status: Open +Status: Closed Type: Bug Package: MySQLi related Operating System: FreeBSD 11.0 PHP Version: 7.1.4 Block user comment: N Private report: N New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2017-05-05 14:36:30] 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 ... ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74547&edit=1

« previous php.bugs (#208969) next »