summaryrefslogtreecommitdiff
path: root/ext/odbc
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-03-20 18:19:16 +0000
committerFelipe Pena <felipe@php.net>2010-03-20 18:19:16 +0000
commit3488cd43be1282bad08030ec321daccbe62fadc1 (patch)
tree8c0aa6f708443ff3b6ada25a1af5bf83ed1f3d47 /ext/odbc
parentad0e1ae3f17d9298470fba9a1dfdd21820e9e529 (diff)
downloadphp-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.c2
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");