Skip to content

Commit 5256798

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Fix default value of $flags in oci_fetch_all()
2 parents c1c1822 + 26aa54e commit 5256798

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ext/oci8/oci8.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,15 +239,15 @@ function ocifetchinto($statement, &$result, int $mode = OCI_NUM): int|false {}
239239
* @param resource $statement
240240
* @param array $output
241241
*/
242-
function oci_fetch_all($statement, &$output, int $offset = 0, int $limit = -1, int $flags = 0): int {}
242+
function oci_fetch_all($statement, &$output, int $offset = 0, int $limit = -1, int $flags = OCI_FETCHSTATEMENT_BY_COLUMN | OCI_ASSOC): int {}
243243

244244
/**
245245
* @param resource $statement
246246
* @param array $output
247247
* @alias oci_fetch_all
248248
* @deprecated
249249
*/
250-
function ocifetchstatement($statement, &$output, int $offset = 0, int $limit = -1, int $flags = 0): int {}
250+
function ocifetchstatement($statement, &$output, int $offset = 0, int $limit = -1, int $flags = OCI_FETCHSTATEMENT_BY_COLUMN | OCI_ASSOC): int {}
251251

252252
/** @param resource $statement */
253253
function oci_fetch_object($statement, int $mode = OCI_ASSOC | OCI_RETURN_NULLS): stdClass|false {}

ext/oci8/oci8_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 57a4d5ea363a2fb6e006adb76ce3d273a2b20828 */
2+
* Stub hash: 1bb2deae12b80335372768e1eb21ec86cfddfae9 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_oci_define_by_name, 0, 3, _IS_BOOL, 0)
55
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)
216216
ZEND_ARG_INFO(1, output)
217217
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0")
218218
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "-1")
219-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
219+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "OCI_FETCHSTATEMENT_BY_COLUMN | OCI_ASSOC")
220220
ZEND_END_ARG_INFO()
221221

222222
#define arginfo_ocifetchstatement arginfo_oci_fetch_all

ext/oci8/oci8_interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ PHP_FUNCTION(oci_fetch_all)
12741274
zval **outarrs;
12751275
ub4 nrows = 1;
12761276
int i;
1277-
zend_long rows = 0, flags = 0, skip = 0, maxrows = -1;
1277+
zend_long rows = 0, flags = PHP_OCI_FETCHSTATEMENT_BY_COLUMN, skip = 0, maxrows = -1;
12781278

12791279
ZEND_PARSE_PARAMETERS_START(2, 5)
12801280
Z_PARAM_RESOURCE(z_statement)

0 commit comments

Comments
 (0)