Skip to content

Commit 31eeca8

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
2 parents 3da368b + e2ecd60 commit 31eeca8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/oci8/oci8_statement.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,11 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows)
262262
zend_hash_apply(statement->columns, php_oci_cleanup_pre_fetch);
263263
}
264264

265+
#if ((OCI_MAJOR_VERSION > 10) || ((OCI_MAJOR_VERSION == 10) && (OCI_MINOR_VERSION >= 2)))
266+
PHP_OCI_CALL_RETURN(errstatus, OCIStmtFetch2, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, 0, OCI_DEFAULT));
267+
#else
265268
PHP_OCI_CALL_RETURN(errstatus, OCIStmtFetch, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, OCI_DEFAULT));
269+
#endif
266270

267271
if (errstatus == OCI_NO_DATA || nrows == 0) {
268272
if (statement->last_query == NULL) {
@@ -338,7 +342,11 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows)
338342
}
339343
}
340344

345+
#if ((OCI_MAJOR_VERSION > 10) || ((OCI_MAJOR_VERSION == 10) && (OCI_MINOR_VERSION >= 2)))
346+
PHP_OCI_CALL_RETURN(errstatus, OCIStmtFetch2, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, 0, OCI_DEFAULT));
347+
#else
341348
PHP_OCI_CALL_RETURN(errstatus, OCIStmtFetch, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, OCI_DEFAULT));
349+
#endif
342350

343351
if (piecewisecols) {
344352
for (i = 0; i < statement->ncolumns; i++) {

0 commit comments

Comments
 (0)