diff options
author | Xinchen Hui <laruence@gmail.com> | 2016-01-04 05:38:15 -0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2016-01-04 05:38:15 -0800 |
commit | 36b4311edd3e2dec31de1582c207e83b09d6f42b (patch) | |
tree | 5617c49e9cc1f7dacdcd72423293907df507470b /ext/pdo_oci | |
parent | 919562d53b539566b89baa3e551dd84c0702bc6e (diff) | |
download | php-git-36b4311edd3e2dec31de1582c207e83b09d6f42b.tar.gz |
Do not edit the value in place (might be relates to #71261)
Diffstat (limited to 'ext/pdo_oci')
-rw-r--r-- | ext/pdo_oci/oci_driver.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c index 608ce29914..bcbcee5532 100644 --- a/ext/pdo_oci/oci_driver.c +++ b/ext/pdo_oci/oci_driver.c @@ -440,6 +440,7 @@ static int oci_handle_rollback(pdo_dbh_t *dbh) /* {{{ */ static int oci_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val) /* {{{ */ { + zend_long lval = zval_get_long(val); pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; if (attr == PDO_ATTR_AUTOCOMMIT) { @@ -454,13 +455,10 @@ static int oci_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val) / dbh->in_txn = 0; } - convert_to_long(val); - - dbh->auto_commit = (unsigned int) (Z_LVAL_P(val)) ? 1 : 0; + dbh->auto_commit = (unsigned int)lval? 1 : 0; return 1; } else if (attr == PDO_ATTR_PREFETCH) { - convert_to_long(val); - H->prefetch = pdo_oci_sanitize_prefetch(Z_LVAL_P(val)); + H->prefetch = pdo_oci_sanitize_prefetch(lval); return 1; } else { return 0; |