summaryrefslogtreecommitdiff
path: root/ext/odbc
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-01-07 12:28:51 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-01-11 15:49:06 +0100
commite219ec144ef6682b71e135fd18654ee1bb4676b4 (patch)
treee4a3ae2b619cdc9fe50ee8e1fa5adb99d804dddf /ext/odbc
parentfe8fdfa3bd588d80ce60f6b3848058239e0a760f (diff)
downloadphp-git-e219ec144ef6682b71e135fd18654ee1bb4676b4.tar.gz
Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2 This is a squash of PR #3734, which is a squash of PR #3313. Co-authored-by: Bob Weinand <bobwei9@hotmail.com> Co-authored-by: Joe Watkins <krakjoe@php.net> Co-authored-by: Dmitry Stogov <dmitry@zend.com>
Diffstat (limited to 'ext/odbc')
-rw-r--r--ext/odbc/php_odbc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index b7b67562a4..9156347e83 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -1876,13 +1876,13 @@ PHP_FUNCTION(odbc_fetch_into)
#endif /* HAVE_SQL_EXTENDED_FETCH */
#ifdef HAVE_SQL_EXTENDED_FETCH
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz/|l", &pv_res, &pv_res_arr, &pv_row) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz|l", &pv_res, &pv_res_arr, &pv_row) == FAILURE) {
return;
}
rownum = pv_row;
#else
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz/", &pv_res, &pv_res_arr) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz", &pv_res, &pv_res_arr) == FAILURE) {
return;
}
#endif /* HAVE_SQL_EXTENDED_FETCH */
@@ -1896,8 +1896,9 @@ PHP_FUNCTION(odbc_fetch_into)
RETURN_FALSE;
}
- if (Z_TYPE_P(pv_res_arr) != IS_ARRAY) {
- array_init(pv_res_arr);
+ pv_res_arr = zend_try_array_init(pv_res_arr);
+ if (!pv_res_arr) {
+ return;
}
#ifdef HAVE_SQL_EXTENDED_FETCH