diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-10-09 19:00:34 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-10-09 19:00:34 +0000 |
commit | 412a28d1243d02f86a2b92fa8b7b68d6e0aa197f (patch) | |
tree | 04184b13f9068ea322f9ebe0ff02814756912a83 | |
parent | 24af08eb80081b8cf5eb6dec401b9006eaf69888 (diff) | |
download | php-git-412a28d1243d02f86a2b92fa8b7b68d6e0aa197f.tar.gz |
MFH: Fixed bug #34777 (Crash in dblib when fetching non-existent error info).
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | ext/pdo_dblib/dblib_driver.c | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -47,6 +47,7 @@ PHP NEWS values). (Dmitry) - Fixed bug #34787 (SOAP Client not handling boolean types correctly). (Dmitry) - Fixed bug #34785 (subclassing of mysqli_stmt does not work). (Georg) +- Fixed bug #34777 (Crash in dblib when fetching non-existent error info). (Ilia) - Fixed bug #34771 (strtotime() fails with 1-12am/pm). (Derick) - Fixed bug #34723 (array_count_values() strips leading zeroes). (Tony) - Fixed bug #34704 (Infinite recursion due to corrupt JPEG). (Marcus) diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index 23087775a5..cef2369883 100644 --- a/ext/pdo_dblib/dblib_driver.c +++ b/ext/pdo_dblib/dblib_driver.c @@ -61,7 +61,9 @@ static int dblib_fetch_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info TSRMLS add_next_index_string(info, message, 0); add_next_index_long(info, einfo->oserr); add_next_index_long(info, einfo->severity); - add_next_index_string(info, einfo->oserrstr, 1); + if (einfo->oserrstr) { + add_next_index_string(info, einfo->oserrstr, 1); + } return 1; } |