php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13923 The PEAR error object returned by DB::connect is not recognized as such
Submitted: 2001-11-04 18:09 UTC Modified: 2001-11-04 22:06 UTC
From: vigna at dsi dot unimi dot it Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.0.6 OS: Red Hat Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vigna at dsi dot unimi dot it
New email:
PHP Version: OS:

 

 [2001-11-04 18:09 UTC] vigna at dsi dot unimi dot it
My PHP setup is a standard RH 7.2 PHP installation. After trying to open a MySQL database using the PEAR database abstraction layer, using a username that does not exists and no password (but an existing database), I get the following error object:

db_error Object
(
    [error_message_prefix] => 
    [error_prepend] =>  
    [error_append] => 
    [mode] => 1
    [level] => 1024
    [code] => -1
    [message] => DB Error: unknown error
    [debuginfo] =>
    [userinfo] => mysql://webuser@localhost/DSI
    [callback] => 
)

However, db::isError() returns *FALSE* on this object. Thus, I cannot distinguish whether the database connection has been established or not.

Patches

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 23:01:29 2024 UTC