Home » Database » DB » Bug #4446
"unknown error" reported when database handle has been disconnected (pgsql)
Details
| Submitted | 2005-05-26 19:31 UTC |
|---|---|
| From | jam at zoidtechnologies dot com |
| Assigned | danielc |
| Status | Closed |
| Package | DB |
| PHP Version | 4.3.11 |
| OS | linux (fc1) |
| Roadmaps | (Not assigned) |
Comments
[2005-05-26 19:31 UTC] jam at zoidtechnologies dot com
Description:
------------
I have a large project that makes use of DB with a pgsql database. in the code, I am using a singleton method which JustinP helped me with and I was closing the database handle too soon and trying to use it again which caused an "uknown error" to be reported for every query.
Reproduce code:
---------------
May 26 15:17:19 toast httpd: bbsengine: common_member: getmember: [db_error: message="DB Error: unknown error" code=-1 mode=return level=notice prefix="" info="select *, extract(epoch from lastlogin) as lastloginepoch, extract(epoch from dateregistered) as dateregisteredepoch from member where id='1' limit 1 [DB Error: unknown error]"]
Expected result:
----------------
it would be nice if DB could detect that the database handle has been disconnected and return "database disconnected" or something.
Actual result:
--------------
DB returns "unknown error"