diff options
author | George Peter Banyard <girgias@php.net> | 2021-01-18 16:07:24 +0000 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2021-01-19 11:42:39 +0000 |
commit | 94ea8e247bb8103e346666dd33de08905b3e67ab (patch) | |
tree | 301f8d32f947f7907ea5f4c23888df878c0534f1 /ext/pdo_oci | |
parent | 9be0ee4309e0f967c187ae59d326e11ae3da9cc5 (diff) | |
download | php-git-94ea8e247bb8103e346666dd33de08905b3e67ab.tar.gz |
Refactor PDO doer handler to use zend_string
Diffstat (limited to 'ext/pdo_oci')
-rw-r--r-- | ext/pdo_oci/oci_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c index 68a52051f6..8fae3ccd05 100644 --- a/ext/pdo_oci/oci_driver.c +++ b/ext/pdo_oci/oci_driver.c @@ -306,7 +306,7 @@ static bool oci_handle_preparer(pdo_dbh_t *dbh, zend_string *sql, pdo_stmt_t *st } /* }}} */ -static zend_long oci_handle_doer(pdo_dbh_t *dbh, const char *sql, size_t sql_len) /* {{{ */ +static zend_long oci_handle_doer(pdo_dbh_t *dbh, const zend_string *sql) /* {{{ */ { pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; OCIStmt *stmt; @@ -316,7 +316,7 @@ static zend_long oci_handle_doer(pdo_dbh_t *dbh, const char *sql, size_t sql_len OCIHandleAlloc(H->env, (dvoid*)&stmt, OCI_HTYPE_STMT, 0, NULL); - H->last_err = OCIStmtPrepare(stmt, H->err, (text*)sql, (ub4) sql_len, OCI_NTV_SYNTAX, OCI_DEFAULT); + H->last_err = OCIStmtPrepare(stmt, H->err, (text*)ZSTR_VAL(sql), (ub4) ZSTR_LEN(sql), OCI_NTV_SYNTAX, OCI_DEFAULT); if (H->last_err) { H->last_err = oci_drv_error("OCIStmtPrepare"); OCIHandleFree(stmt, OCI_HTYPE_STMT); |