diff options
Diffstat (limited to 'ext/oci8/oci8_interface.c')
-rw-r--r-- | ext/oci8/oci8_interface.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index b0a8104827..5da3084520 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -12,7 +12,7 @@ | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ - | Authors: Stig Sæther Bakken <ssb@php.net> | + | Authors: Stig Sæther Bakken <ssb@php.net> | | Thies C. Arntzen <thies@thieso.net> | | | | Collection support by Andy Sautins <asautins@veripost.net> | @@ -56,13 +56,21 @@ PHP_FUNCTION(oci_register_taf_callback) } if (callback) { +#if PHP_MAJOR_VERSION > 7 || (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION >= 2) + if (!zend_is_callable(callback, 0, 0)) { + callback_name = zend_get_callable_name(callback); + php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(callback_name)); + zend_string_release(callback_name); + RETURN_FALSE; + } +#else if (!zend_is_callable(callback, 0, &callback_name)) { php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(callback_name)); zend_string_release(callback_name); RETURN_FALSE; } - zend_string_release(callback_name); +#endif } PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); |