Version: 4.2.2
ODBC: ODBC Driver 17 for SQL Server (on windows)
Bug Description
Argument 1 passed to Dibi\Exception::__construct() must be of the type string, null given, called in D:\www_root_vip\vendor\dibi\dibi\src\Dibi\Drivers\SqlsrvDriver.php on line 73 and Notice: Trying to access array offset on value of type null in D:\www_root_vip\vendor\dibi\dibi\src\Dibi\Drivers\SqlsrvDriver.php:73
For example incorrect password in dibi configuration or any issue with initial connection
Expected Behavior
Show correct error message
Possible Solution
Maybe move sqlsrv_configure('WarningsReturnAsErrors', 1) after exception throw block? I don't know what is the reason for workaround in mentioned commit.
Version: 4.2.2 ODBC: ODBC Driver 17 for SQL Server (on windows)
Bug Description
Argument 1 passed to Dibi\Exception::__construct() must be of the type string, null given, called in D:\www_root_vip\vendor\dibi\dibi\src\Dibi\Drivers\SqlsrvDriver.php on line 73
andNotice: Trying to access array offset on value of type null in D:\www_root_vip\vendor\dibi\dibi\src\Dibi\Drivers\SqlsrvDriver.php:73
I think it is caused by this call https://github.com/dg/dibi/blob/15a9c989ce80dc8e1e54ffc07e0acb2d6dcc39db/src/Dibi/Drivers/SqlsrvDriver.php#L66 added in https://github.com/dg/dibi/commit/40ad77cf5fb46c6ba3264a41071daac8c65781a7
because sqlsrv_errors
and that is
sqlsrv_configure
call https://github.com/microsoft/msphpsql/blob/00de4738ce214666292a69f7786ff7f2c083f86e/source/sqlsrv/util.cpp#L571Steps To Reproduce
For example incorrect password in dibi configuration or any issue with initial connection
Expected Behavior
Show correct error message
Possible Solution
Maybe move
sqlsrv_configure('WarningsReturnAsErrors', 1)
after exception throw block? I don't know what is the reason for workaround in mentioned commit.