|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81535 db2_conn_error() returns an empty value after a connectoin failure
Submitted: 2021-10-18 06:47 UTC Modified: -
From: morozov at tut dot by Assigned:
Status: Open Package: ibm_db2 (PECL)
PHP Version: 8.0.11 OS: Linux
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.
Block user comment
Status: Assign to:
Bug Type:
From: morozov at tut dot by
New email:
PHP Version: OS:


 [2021-10-18 06:47 UTC] morozov at tut dot by
The db2_conn_error() returns an empty value after a connection failure, although according to the documentation[1] it should be non-empty. Usually, an empty SQLSTATE is 00000.


Test script:
$conn = db2_connect('badname', 'baduser', 'badpassword');

if (!$conn) {

Expected result:
string(5) "08001"

Actual result:
string(5) "     "


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 13 01:01:28 2024 UTC