Fixed pdo_firebird_handle_factory to check ret when starting a transaction (#17632)

Changed to not execute php_firebird_begin_transaction
if transaction cannot be started successfully

Closes #17632
This commit is contained in:
Saki Takamachi 2025-03-15 08:50:55 +09:00
parent 6717947ffe
commit e96a35b9a8
No known key found for this signature in database
GPG key ID: 770426E17EBBB3DD

View file

@ -1431,7 +1431,7 @@ static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /*
"HY000", H->isc_status[1], errmsg);
}
if (dbh->auto_commit && !H->tr) {
if (ret && dbh->auto_commit && !H->tr) {
ret = php_firebird_begin_transaction(dbh, /* auto commit mode */ true);
}