Skip to content

Commit 0c1650b

Browse files
author
Tianfang Yang
committed
Merge branch 'PHP-7.2'
2 parents beb9295 + 1135161 commit 0c1650b

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

ext/oci8/oci8_interface.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,28 @@ PHP_FUNCTION(oci_register_taf_callback)
4949
zval *z_connection;
5050
php_oci_connection *connection;
5151
zval *callback;
52+
zend_string *callback_name;
5253

5354
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z!", &z_connection, &callback) == FAILURE) {
5455
return;
5556
}
5657

5758
if (callback) {
58-
if (!zend_is_callable(callback, 0, NULL)) {
59-
zend_string *callback_name = zend_get_callable_name(callback);
59+
#if PHP_MAJOR_VERSION > 7 || (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION >= 2)
60+
if (!zend_is_callable(callback, 0, 0)) {
61+
callback_name = zend_get_callable_name(callback);
6062
php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(callback_name));
6163
zend_string_release(callback_name);
6264
RETURN_FALSE;
6365
}
66+
#else
67+
if (!zend_is_callable(callback, 0, &callback_name)) {
68+
php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(callback_name));
69+
zend_string_release(callback_name);
70+
RETURN_FALSE;
71+
}
72+
zend_string_release(callback_name);
73+
#endif
6474
}
6575

6676
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);

ext/oci8/tests/xmltype_02.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,4 @@ string(%d) "<?xml version="1.0"?>
178178
%sVClearance>10</VClearance>
179179
</Warehouse>
180180
"
181-
===DONE===
181+
===DONE===

0 commit comments

Comments
 (0)