summaryrefslogtreecommitdiff
path: root/ext/pdo_dblib/dblib_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_dblib/dblib_driver.c')
-rw-r--r--ext/pdo_dblib/dblib_driver.c4
1 files changed, 3 insertions, 1 deletions
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;
}