diff options
author | Ondřej Surý <ondrej@sury.org> | 2013-10-27 20:38:12 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2013-10-27 20:38:12 +0100 |
commit | 749e5ad39dbac3f4f62be438367f8cdf90056815 (patch) | |
tree | ad0677df3bf44a6761380686e400ffd878585288 /ext/pdo_dblib/pdo_dblib.c | |
parent | 4ed39205864f58ba7c368e4ae1362d8214469fd9 (diff) | |
download | php-749e5ad39dbac3f4f62be438367f8cdf90056815.tar.gz |
New upstream version 5.4.21upstream/5.4.21
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 ed79aea20..bc5d364ed 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; |