]> granicus.if.org Git - php/commitdiff
- Errcode might be empty
authorMarcus Boerger <helly@php.net>
Sat, 12 Mar 2005 00:50:20 +0000 (00:50 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 12 Mar 2005 00:50:20 +0000 (00:50 +0000)
ext/sqlite/pdo_sqlite2.c

index 563a191713fa64d59caa9400e3dbef39b9e2d516..3151fa19e784ad10b1e3024621473cc9d3c54198 100644 (file)
@@ -310,7 +310,9 @@ static int pdo_sqlite2_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *
 
        if (einfo->errcode) {
                add_next_index_long(info, einfo->errcode);
-               add_next_index_string(info, einfo->errmsg, 1);
+               if (einfo->errmsg) {
+                       add_next_index_string(info, einfo->errmsg, 1);
+               }
        }
 
        return 1;