From: Wez Furlong Date: Sat, 11 Jun 2005 02:50:20 +0000 (+0000) Subject: couple of conceptual errors here X-Git-Tag: php-5.1.0b2~241 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f124c2086e90b99d283b801d178b3eae9aaa9905;p=php couple of conceptual errors here --- diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 09421863a5..53859d4931 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1116,11 +1116,10 @@ static void dbh_free(pdo_dbh_t *dbh TSRMLS_DC) static void pdo_dbh_free_storage(pdo_dbh_t *dbh TSRMLS_DC) { - if (dbh->methods->rollback) { + if (dbh->methods && dbh->methods->rollback) { /* roll back transactions, that are possibly nested, even though we don't * official support them */ - while (dbh->methods->rollback(dbh TSRMLS_CC)) - ; + dbh->methods->rollback(dbh TSRMLS_CC); dbh->in_txn = 0; }