]> granicus.if.org Git - php/commitdiff
- Fixed bug #49429, #51331 (odbc_autocommit doesn't work)
authorFelipe Pena <felipe@php.net>
Sat, 20 Mar 2010 18:19:16 +0000 (18:19 +0000)
committerFelipe Pena <felipe@php.net>
Sat, 20 Mar 2010 18:19:16 +0000 (18:19 +0000)
NEWS
ext/odbc/php_odbc.c

diff --git a/NEWS b/NEWS
index 2f58d1ae7c133b74050503c8a3578ada04e01f9c..3fb71d08b0d0382dcfb0d907aace36de696a6796 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -41,6 +41,7 @@ PHP                                                                        NEWS
 - Fixed bug #50358 (Compile failure compiling ext/phar/util.lo). (Felipe)
 - Fixed bug #49778 (DateInterval::format("%a") is always zero when an interval
   is created from an ISO string). (Derick)
+- Fixed bug #49429 (odbc_autocommit doesn't work). (Felipe)
 - Fixed bug #49059 (DateTime::diff() repeats previous sub() operation).
   (yoarvi@gmail.com, Derick)
 - Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)
index e989b6df20f4a17786f0c22dd7f617d84e7da05a..7274d74f0ccfc5ca77f5a71366e1f43a1904d320 100644 (file)
@@ -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");