Skip to content

Commit 03f6b16

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
2 parents b3a6ca9 + 465c149 commit 03f6b16

File tree

5 files changed

+138
-96
lines changed

5 files changed

+138
-96
lines changed

ext/oci8/README

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ Use 'pecl install oci8-2.0.12' to install for PHP 5.2 - PHP 5.6.
1111

1212
Use 'pecl install oci8-1.4.10' to install for PHP 4.3.9 - PHP 5.1.
1313

14-
The OCI8 extension needs to be linked with Oracle 12, 11, or 10.2
14+
The OCI8 extension needs to be linked with Oracle 18, 12, 11, or 10.2
1515
client libraries. These libraries are found in your database
1616
installation, or in the free Oracle Instant Client from
17-
http://www.oracle.com/technetwork/database/features/instant-client/
18-
Install the 'Basic' or 'Basic Lite' Instant Client package. If
17+
https://www.oracle.com/technetwork/database/database-technologies/instant-client/overview/index.html
18+
Install the 'Basic' or 'Basic Light' Instant Client package. If
1919
building from source, then also install the SDK package.
2020

21-
Oracle's standard cross-version connectivity applies. For example,
22-
PHP OCI8 linked with Instant Client 11.2 can connect to Oracle
23-
Database 9.2 onward. See Oracle's note "Oracle Client / Server
21+
Oracle's standard cross-version interoperability applies. For
22+
example, PHP OCI8 linked with Instant Client 11.2 can connect to
23+
Oracle Database 9.2 onward. See Oracle's note "Oracle Client / Server
2424
Interoperability Support" (ID 207303.1) for details.

ext/oci8/oci8.c

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,9 +1630,14 @@ void php_oci_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent, int exclus
16301630
zend_long session_mode = OCI_DEFAULT;
16311631

16321632
/* if a fourth parameter is handed over, it is the charset identifier (but is only used in Oracle 9i+) */
1633-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|ssl", &username, &username_len, &password, &password_len, &dbname, &dbname_len, &charset, &charset_len, &session_mode) == FAILURE) {
1634-
return;
1635-
}
1633+
ZEND_PARSE_PARAMETERS_START(2, 5)
1634+
Z_PARAM_STRING(username, username_len)
1635+
Z_PARAM_STRING(password, password_len)
1636+
Z_PARAM_OPTIONAL
1637+
Z_PARAM_STRING(dbname, dbname_len)
1638+
Z_PARAM_STRING(charset, charset_len)
1639+
Z_PARAM_LONG(session_mode)
1640+
ZEND_PARSE_PARAMETERS_END();
16361641

16371642
#ifdef HAVE_OCI8_DTRACE
16381643
if (DTRACE_OCI8_CONNECT_ENTRY_ENABLED()) {
@@ -2547,9 +2552,12 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg
25472552
if (expected_args > 2) {
25482553
/* only for ocifetchinto BC */
25492554

2550-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz|l", &z_statement, &array, &fetch_mode) == FAILURE) {
2551-
return;
2552-
}
2555+
ZEND_PARSE_PARAMETERS_START(2, 3)
2556+
Z_PARAM_RESOURCE(z_statement)
2557+
Z_PARAM_ZVAL(array)
2558+
Z_PARAM_OPTIONAL
2559+
Z_PARAM_LONG(fetch_mode)
2560+
ZEND_PARSE_PARAMETERS_END();
25532561

25542562
if (ZEND_NUM_ARGS() == 2) {
25552563
fetch_mode = mode;
@@ -2563,19 +2571,21 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg
25632571
} else if (expected_args == 2) {
25642572
/* only for oci_fetch_array() */
25652573

2566-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &z_statement, &fetch_mode) == FAILURE) {
2567-
return;
2568-
}
2574+
ZEND_PARSE_PARAMETERS_START(1, 2)
2575+
Z_PARAM_RESOURCE(z_statement)
2576+
Z_PARAM_OPTIONAL
2577+
Z_PARAM_LONG(fetch_mode)
2578+
ZEND_PARSE_PARAMETERS_END();
25692579

25702580
if (ZEND_NUM_ARGS() == 1) {
25712581
fetch_mode = mode;
25722582
}
25732583
} else {
25742584
/* for all oci_fetch_*() */
25752585

2576-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &z_statement) == FAILURE) {
2577-
return;
2578-
}
2586+
ZEND_PARSE_PARAMETERS_START(1, 1)
2587+
Z_PARAM_RESOURCE(z_statement)
2588+
ZEND_PARSE_PARAMETERS_END();
25792589

25802590
fetch_mode = mode;
25812591
}

0 commit comments

Comments
 (0)