]> granicus.if.org Git - php/commitdiff
blind fix for a segfault in ext/pdo_firebird/tests/bug_38253.phpt
authorAntony Dovgal <tony2001@php.net>
Sun, 13 Jul 2008 10:55:50 +0000 (10:55 +0000)
committerAntony Dovgal <tony2001@php.net>
Sun, 13 Jul 2008 10:55:50 +0000 (10:55 +0000)
ext/pdo_firebird/firebird_driver.c

index 7c6d19969c464484139ba8cd89e0d12c7956d6bb..dd269a8c9df4d88090dba82369b75c9bebae603a 100644 (file)
@@ -608,7 +608,7 @@ static int pdo_firebird_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval
                        strcpy(&buf[i++], " ");
                }
                add_next_index_string(info, buf, 1);
-       } else {
+       } else if (H->last_app_error) {
                add_next_index_long(info, -999);
                add_next_index_string(info, const_cast(H->last_app_error),1);
        }