Fix default value of $flags in oci_fetch_all() (#7429)

This commit is contained in:
Máté Kocsis 2021-08-31 10:05:24 +02:00 committed by GitHub
parent fcbe737218
commit 26aa54e098
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -239,7 +239,7 @@ function ocifetchinto($statement, &$result, int $mode = OCI_NUM): int|false {}
* @param resource $statement * @param resource $statement
* @param array $output * @param array $output
*/ */
function oci_fetch_all($statement, &$output, int $offset = 0, int $limit = -1, int $flags = 0): int {} function oci_fetch_all($statement, &$output, int $offset = 0, int $limit = -1, int $flags = OCI_FETCHSTATEMENT_BY_COLUMN | OCI_ASSOC): int {}
/** /**
* @param resource $statement * @param resource $statement
@ -247,7 +247,7 @@ function oci_fetch_all($statement, &$output, int $offset = 0, int $limit = -1, i
* @alias oci_fetch_all * @alias oci_fetch_all
* @deprecated * @deprecated
*/ */
function ocifetchstatement($statement, &$output, int $offset = 0, int $limit = -1, int $flags = 0): int {} function ocifetchstatement($statement, &$output, int $offset = 0, int $limit = -1, int $flags = OCI_FETCHSTATEMENT_BY_COLUMN | OCI_ASSOC): int {}
/** @param resource $statement */ /** @param resource $statement */
function oci_fetch_object($statement, int $mode = OCI_ASSOC | OCI_RETURN_NULLS): stdClass|false {} function oci_fetch_object($statement, int $mode = OCI_ASSOC | OCI_RETURN_NULLS): stdClass|false {}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead. /* This is a generated file, edit the .stub.php file instead.
* Stub hash: 4df305f0e3750245ed9f9f9bc10edc339328084a */ * Stub hash: 95565a6dc86d41fa6ddf3228d68ac0c5167dbe37 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_oci_define_by_name, 0, 3, _IS_BOOL, 0) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_oci_define_by_name, 0, 3, _IS_BOOL, 0)
ZEND_ARG_INFO(0, statement) ZEND_ARG_INFO(0, statement)
@ -216,7 +216,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_oci_fetch_all, 0, 2, IS_LONG, 0)
ZEND_ARG_INFO(1, output) ZEND_ARG_INFO(1, output)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "-1") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "-1")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "OCI_FETCHSTATEMENT_BY_COLUMN | OCI_ASSOC")
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()
#define arginfo_ocifetchstatement arginfo_oci_fetch_all #define arginfo_ocifetchstatement arginfo_oci_fetch_all

View file

@ -1274,7 +1274,7 @@ PHP_FUNCTION(oci_fetch_all)
zval **outarrs; zval **outarrs;
ub4 nrows = 1; ub4 nrows = 1;
int i; int i;
zend_long rows = 0, flags = 0, skip = 0, maxrows = -1; zend_long rows = 0, flags = PHP_OCI_FETCHSTATEMENT_BY_COLUMN, skip = 0, maxrows = -1;
ZEND_PARSE_PARAMETERS_START(2, 5) ZEND_PARSE_PARAMETERS_START(2, 5)
Z_PARAM_RESOURCE(z_statement) Z_PARAM_RESOURCE(z_statement)