Skip to content

Fix some types in ext/oci8 #6992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions ext/oci8/oci8.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ function oci_bind_by_name($statement, string $param, mixed &$var, int $max_lengt
*/
function ocibindbyname($statement, string $param, mixed &$var, int $max_length = -1, int $type = 0): bool {}

/** @param resource $statement */
function oci_bind_array_by_name($statement, string $param, mixed &$var, int $max_array_length, int $max_item_length = -1, int $type = SQLT_AFC): bool {}
/**
* @param resource $statement
* @param array $var
*/
function oci_bind_array_by_name($statement, string $param, &$var, int $max_array_length, int $max_item_length = -1, int $type = SQLT_AFC): bool {}

function oci_free_descriptor(OCILob $lob): bool {}

Expand Down Expand Up @@ -247,7 +250,7 @@ function oci_fetch_all($statement, &$output, int $offset = 0, int $limit = -1, i
function ocifetchstatement($statement, &$output, int $offset = 0, int $limit = -1, int $flags = 0): int {}

/** @param resource $statement */
function oci_fetch_object($statement, int $mode = PHP_OCI_ASSOC | PHP_OCI_RETURN_NULLS): stdClass|null|false {}
function oci_fetch_object($statement, int $mode = PHP_OCI_ASSOC | PHP_OCI_RETURN_NULLS): stdClass|false {}

/** @param resource $statement */
function oci_fetch_row($statement): array|false {}
Expand Down
6 changes: 3 additions & 3 deletions ext/oci8/oci8_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: e7a7a9402b2668136f9f47d6e547e3af46a78a50 */
* Stub hash: 7355ccbef6b490db7ddec94d485fbfb4597c3150 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_oci_define_by_name, 0, 3, _IS_BOOL, 0)
ZEND_ARG_INFO(0, statement)
Expand All @@ -23,7 +23,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_oci_bind_array_by_name, 0, 4, _IS_BOOL, 0)
ZEND_ARG_INFO(0, statement)
ZEND_ARG_TYPE_INFO(0, param, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(1, var, IS_MIXED, 0)
ZEND_ARG_INFO(1, var)
ZEND_ARG_TYPE_INFO(0, max_array_length, IS_LONG, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_item_length, IS_LONG, 0, "-1")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_LONG, 0, "SQLT_AFC")
Expand Down Expand Up @@ -221,7 +221,7 @@ ZEND_END_ARG_INFO()

#define arginfo_ocifetchstatement arginfo_oci_fetch_all

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_oci_fetch_object, 0, 1, stdClass, MAY_BE_NULL|MAY_BE_FALSE)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_oci_fetch_object, 0, 1, stdClass, MAY_BE_FALSE)
ZEND_ARG_INFO(0, statement)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PHP_OCI_ASSOC | PHP_OCI_RETURN_NULLS")
ZEND_END_ARG_INFO()
Expand Down