diff options
author | Stanley Sufficool <ssufficool@php.net> | 2013-06-01 00:03:44 -0700 |
---|---|---|
committer | Stanley Sufficool <ssufficool@php.net> | 2013-06-01 00:03:44 -0700 |
commit | d9be9e0231277b7baf457f9a59dc7616624f8e2e (patch) | |
tree | 252a05025fb10790b94c08a740268e79dd5e42b3 /ext/pdo_dblib/pdo_dblib.c | |
parent | 3b54de3db008490eeae8fba2e471a41906d1eae5 (diff) | |
download | php-git-d9be9e0231277b7baf457f9a59dc7616624f8e2e.tar.gz |
FIX BUG #60512 (the correct way this time)
Last fix just truncated the password. This fixes the message
handler per the bug report.
Diffstat (limited to 'ext/pdo_dblib/pdo_dblib.c')
-rw-r--r-- | ext/pdo_dblib/pdo_dblib.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/pdo_dblib/pdo_dblib.c b/ext/pdo_dblib/pdo_dblib.c index ed79aea20d..bc5d364ed3 100644 --- a/ext/pdo_dblib/pdo_dblib.c +++ b/ext/pdo_dblib/pdo_dblib.c @@ -93,8 +93,12 @@ int error_handler(DBPROCESS *dbproc, int severity, int dberr, char *state = "HY000"; TSRMLS_FETCH(); - einfo = (pdo_dblib_err*)dbgetuserdata(dbproc); - if (!einfo) einfo = &DBLIB_G(err); + if(dbproc) { + einfo = (pdo_dblib_err*)dbgetuserdata(dbproc); + if (!einfo) einfo = &DBLIB_G(err); + } else { + einfo = &DBLIB_G(err); + } einfo->severity = severity; einfo->oserr = oserr; |