]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #34777 (Crash in dblib when fetching non-existent error info).
authorIlia Alshanetsky <iliaa@php.net>
Sun, 9 Oct 2005 19:00:34 +0000 (19:00 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 9 Oct 2005 19:00:34 +0000 (19:00 +0000)
NEWS
ext/pdo_dblib/dblib_driver.c

diff --git a/NEWS b/NEWS
index 1a6939ebfe50aed5365aac0c4a55e2fea659f19b..8b34902aba79b4baa3a69c19d1c6f7a53cb13f72 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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)
index 23087775a5d4efb2ba71783165f3cf53c08a5d07..cef2369883596316ac407c951fe9c1161689ebd8 100644 (file)
@@ -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;
 }