diff options
author | Felipe Pena <felipe@php.net> | 2010-03-20 18:19:16 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2010-03-20 18:19:16 +0000 |
commit | 3488cd43be1282bad08030ec321daccbe62fadc1 (patch) | |
tree | 8c0aa6f708443ff3b6ada25a1af5bf83ed1f3d47 /ext/odbc | |
parent | ad0e1ae3f17d9298470fba9a1dfdd21820e9e529 (diff) | |
download | php-git-3488cd43be1282bad08030ec321daccbe62fadc1.tar.gz |
- Fixed bug #49429, #51331 (odbc_autocommit doesn't work)
Diffstat (limited to 'ext/odbc')
-rw-r--r-- | ext/odbc/php_odbc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index e989b6df20..7274d74f0c 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2864,7 +2864,7 @@ PHP_FUNCTION(odbc_autocommit) ZEND_FETCH_RESOURCE2(conn, odbc_connection *, &pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - if (pv_onoff) { + if (ZEND_NUM_ARGS() > 1) { rc = SQLSetConnectOption(conn->hdbc, SQL_AUTOCOMMIT, (pv_onoff) ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF); if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { odbc_sql_error(conn, SQL_NULL_HSTMT, "Set autocommit"); |