summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/filter/callback_filter.c2
-rw-r--r--ext/interbase/ibase_events.c2
-rw-r--r--ext/interbase/php_ibase_udf.c6
-rw-r--r--ext/ldap/ldap.c2
-rw-r--r--ext/mysqli/mysqli_api.c2
-rwxr-xr-xext/pcntl/pcntl.c2
-rw-r--r--ext/pcre/php_pcre.c2
-rwxr-xr-xext/pdo/pdo_stmt.c2
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c6
-rw-r--r--ext/readline/readline.c4
-rw-r--r--ext/session/session.c2
-rwxr-xr-xext/spl/spl_iterators.c2
-rw-r--r--ext/sqlite/sqlite.c6
-rw-r--r--ext/sqlite3/sqlite3.c6
-rw-r--r--ext/standard/array.c2
-rw-r--r--ext/standard/basic_functions.c6
-rw-r--r--ext/standard/type.c4
-rw-r--r--ext/xmlrpc/xmlrpc-epi-php.c2
18 files changed, 32 insertions, 28 deletions
diff --git a/ext/filter/callback_filter.c b/ext/filter/callback_filter.c
index 62c14e335f..b500c5b4ed 100644
--- a/ext/filter/callback_filter.c
+++ b/ext/filter/callback_filter.c
@@ -26,7 +26,7 @@ void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL)
zval ***args;
int status;
- if (!option_array || !zend_is_callable(option_array, IS_CALLABLE_CHECK_NO_ACCESS, NULL)) {
+ if (!option_array || !zend_is_callable(option_array, IS_CALLABLE_CHECK_NO_ACCESS, NULL TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "First argument is expected to be a valid callback");
zval_dtor(value);
Z_TYPE_P(value) = IS_NULL;
diff --git a/ext/interbase/ibase_events.c b/ext/interbase/ibase_events.c
index f5d303c2db..b4c204ba26 100644
--- a/ext/interbase/ibase_events.c
+++ b/ext/interbase/ibase_events.c
@@ -304,7 +304,7 @@ PHP_FUNCTION(ibase_set_event_handler)
}
/* get the callback */
- if (!zend_is_callable(*cb_arg, 0, NULL)) {
+ if (!zend_is_callable(*cb_arg, 0, NULL TSRMLS_CC)) {
_php_ibase_module_error("Callback argument %s is not a callable function"
TSRMLS_CC, Z_STRVAL_PP(cb_arg));
RETURN_FALSE;
diff --git a/ext/interbase/php_ibase_udf.c b/ext/interbase/php_ibase_udf.c
index 4bdeb87dfb..3945d465b7 100644
--- a/ext/interbase/php_ibase_udf.c
+++ b/ext/interbase/php_ibase_udf.c
@@ -192,10 +192,14 @@ static void call_php(char *name, PARAMDSC *r, int argc, PARAMDSC **argv)
INIT_ZVAL(callback);
ZVAL_STRING(&callback,name,0);
+ LOCK();
+
/* check if the requested function exists */
- if (!zend_is_callable(&callback, 0, NULL)) {
+ if (!zend_is_callable(&callback, 0, NULL TSRMLS_CC)) {
break;
}
+
+ UNLOCK();
/* create the argument array */
for (i = 0; i < argc; ++i) {
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index 9adf9a77c3..ffbabfc1e3 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -2132,7 +2132,7 @@ PHP_FUNCTION(ldap_set_rebind_proc)
}
/* callable? */
- if (!zend_is_callable(callback, 0, &callback_name)) {
+ if (!zend_is_callable(callback, 0, &callback_name TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Two arguments expected for '%s' to be a valid callback", callback_name);
efree(callback_name);
RETURN_FALSE;
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 8e6c092654..b8f426ea3d 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -1420,7 +1420,7 @@ PHP_FUNCTION(mysqli_set_local_infile_handler)
MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID);
/* check callback function */
- if (!zend_is_callable(callback_func, 0, &callback_name)) {
+ if (!zend_is_callable(callback_func, 0, &callback_name TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not a valid callback function %s", callback_name);
efree(callback_name);
RETURN_FALSE;
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index 0f28e3ce17..d431bd855a 100755
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -728,7 +728,7 @@ PHP_FUNCTION(pcntl_signal)
RETURN_TRUE;
}
- if (!zend_is_callable(handle, 0, &func_name)) {
+ if (!zend_is_callable(handle, 0, &func_name TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s is not a callable function name error", func_name);
efree(func_name);
RETURN_FALSE;
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 0192ebfafa..0e15793475 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -1315,7 +1315,7 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callabl
if (Z_TYPE_PP(replace) != IS_ARRAY && (Z_TYPE_PP(replace) != IS_OBJECT || !is_callable_replace))
convert_to_string_ex(replace);
if (is_callable_replace) {
- if (!zend_is_callable(*replace, 0, &callback_name)) {
+ if (!zend_is_callable(*replace, 0, &callback_name TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Requires argument 2, '%s', to be a valid callback", callback_name);
efree(callback_name);
*return_value = **subject;
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 38d2947944..94c6adbefa 100755
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -809,7 +809,7 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info *
method = &callable;
}
- if (!method || !zend_is_callable(callable, 0, &fname)) {
+ if (!method || !zend_is_callable(callable, 0, &fname TSRMLS_CC)) {
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "user-supplied function must be a valid callback" TSRMLS_CC);
if (fname) {
efree(fname);
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index 580274c52a..9e4b4c4794 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -479,7 +479,7 @@ static PHP_METHOD(SQLite, sqliteCreateFunction)
dbh = zend_object_store_get_object(getThis() TSRMLS_CC);
PDO_CONSTRUCT_CHECK;
- if (!zend_is_callable(callback, 0, &cbname)) {
+ if (!zend_is_callable(callback, 0, &cbname TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%s' is not callable", cbname);
efree(cbname);
RETURN_FALSE;
@@ -551,13 +551,13 @@ static PHP_METHOD(SQLite, sqliteCreateAggregate)
dbh = zend_object_store_get_object(getThis() TSRMLS_CC);
PDO_CONSTRUCT_CHECK;
- if (!zend_is_callable(step_callback, 0, &cbname)) {
+ if (!zend_is_callable(step_callback, 0, &cbname TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%s' is not callable", cbname);
efree(cbname);
RETURN_FALSE;
}
efree(cbname);
- if (!zend_is_callable(fini_callback, 0, &cbname)) {
+ if (!zend_is_callable(fini_callback, 0, &cbname TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "function '%s' is not callable", cbname);
efree(cbname);
RETURN_FALSE;
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 9ab3c321e1..ee7bd7b2ad 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -499,7 +499,7 @@ PHP_FUNCTION(readline_completion_function)
RETURN_FALSE;
}
- if (!zend_is_callable(arg, 0, &name)) {
+ if (!zend_is_callable(arg, 0, &name TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s is not callable", name);
efree(name);
RETURN_FALSE;
@@ -551,7 +551,7 @@ PHP_FUNCTION(readline_callback_handler_install)
return;
}
- if (!zend_is_callable(callback, 0, &name)) {
+ if (!zend_is_callable(callback, 0, &name TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s is not callable", name);
RETURN_FALSE;
}
diff --git a/ext/session/session.c b/ext/session/session.c
index 3353cc8f50..0fe7210795 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -1583,7 +1583,7 @@ PHP_FUNCTION(session_set_save_handler)
}
for (i = 0; i < 6; i++) {
- if (!zend_is_callable(*args[i], 0, &name)) {
+ if (!zend_is_callable(*args[i], 0, &name TSRMLS_CC)) {
efree(args);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument %d is not a valid callback", i+1);
efree(name);
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index 8d3ecafe5a..82ad3e0f34 100755
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -1183,7 +1183,7 @@ int spl_dual_it_call_method(char *method, INTERNAL_FUNCTION_PARAMETERS)
intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
ZVAL_STRING(&func, method, 0);
- if (!zend_is_callable(&func, 0, &method)) {
+ if (!zend_is_callable(&func, 0, &method TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Method %s::%s() does not exist", intern->inner.ce->name, method);
return FAILURE;
}
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index b1d36fdba2..8c183e4e48 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -3354,14 +3354,14 @@ PHP_FUNCTION(sqlite_create_aggregate)
DB_FROM_ZVAL(db, &zdb);
}
- if (!zend_is_callable(zstep, 0, &callable)) {
+ if (!zend_is_callable(zstep, 0, &callable TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "step function `%s' is not callable", callable);
efree(callable);
return;
}
efree(callable);
- if (!zend_is_callable(zfinal, 0, &callable)) {
+ if (!zend_is_callable(zfinal, 0, &callable TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "finalize function `%s' is not callable", callable);
efree(callable);
return;
@@ -3405,7 +3405,7 @@ PHP_FUNCTION(sqlite_create_function)
DB_FROM_ZVAL(db, &zdb);
}
- if (!zend_is_callable(zcall, 0, &callable)) {
+ if (!zend_is_callable(zcall, 0, &callable TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "function `%s' is not callable", callable);
efree(callable);
return;
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index 6c00ba5d6a..cd6037fffd 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -776,7 +776,7 @@ PHP_METHOD(sqlite3, createFunction)
RETURN_FALSE;
}
- if (!zend_is_callable(callback_func, 0, &callback_name)) {
+ if (!zend_is_callable(callback_func, 0, &callback_name TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not a valid callback function %s", callback_name);
efree(callback_name);
RETURN_FALSE;
@@ -827,14 +827,14 @@ PHP_METHOD(sqlite3, createAggregate)
RETURN_FALSE;
}
- if (!zend_is_callable(step_callback, 0, &callback_name)) {
+ if (!zend_is_callable(step_callback, 0, &callback_name TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not a valid callback function %s", callback_name);
efree(callback_name);
RETURN_FALSE;
}
efree(callback_name);
- if (!zend_is_callable(fini_callback, 0, &callback_name)) {
+ if (!zend_is_callable(fini_callback, 0, &callback_name TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not a valid callback function %s", callback_name);
efree(callback_name);
RETURN_FALSE;
diff --git a/ext/standard/array.c b/ext/standard/array.c
index d1877876fb..50ac3b19e5 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -616,7 +616,7 @@ static int php_array_user_compare(const void *a, const void *b TSRMLS_DC) /* {{{
/* check if comparison function is valid */
#define PHP_ARRAY_CMP_FUNC_CHECK(func_name) \
- if (!zend_is_callable(*func_name, 0, NULL)) { \
+ if (!zend_is_callable(*func_name, 0, NULL TSRMLS_CC)) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid comparison function"); \
BG(user_compare_fci) = old_user_compare_fci; \
BG(user_compare_fci_cache) = old_user_compare_fci_cache; \
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index da2aec9c6e..4b2a766711 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -5289,7 +5289,7 @@ static int user_shutdown_function_call(php_shutdown_function_entry *shutdown_fun
zval retval;
char *function_name;
- if (!zend_is_callable(shutdown_function_entry->arguments[0], 0, &function_name)) {
+ if (!zend_is_callable(shutdown_function_entry->arguments[0], 0, &function_name TSRMLS_CC)) {
php_error(E_WARNING, "(Registered shutdown functions) Unable to call %s() - function does not exist", function_name);
if (function_name) {
efree(function_name);
@@ -5434,7 +5434,7 @@ PHP_FUNCTION(register_shutdown_function)
}
/* Prevent entering of anything but valid callback (syntax check only!) */
- if (!zend_is_callable(shutdown_function_entry.arguments[0], 0, &function_name)) {
+ if (!zend_is_callable(shutdown_function_entry.arguments[0], 0, &function_name TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", function_name);
efree(shutdown_function_entry.arguments);
RETVAL_FALSE;
@@ -6021,7 +6021,7 @@ PHP_FUNCTION(register_tick_function)
RETURN_FALSE;
}
- if (!zend_is_callable(tick_fe.arguments[0], 0, &function_name)) {
+ if (!zend_is_callable(tick_fe.arguments[0], 0, &function_name TSRMLS_CC)) {
efree(tick_fe.arguments);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid tick callback '%s' passed", function_name);
efree(function_name);
diff --git a/ext/standard/type.c b/ext/standard/type.c
index 39711d39f5..e4632add20 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -368,11 +368,11 @@ PHP_FUNCTION(is_callable)
syntax_only = syntax_only ? IS_CALLABLE_CHECK_SYNTAX_ONLY : 0;
if (ZEND_NUM_ARGS() > 2) {
- retval = zend_is_callable(var, syntax_only, &name);
+ retval = zend_is_callable(var, syntax_only, &name TSRMLS_CC);
zval_dtor(*callable_name);
ZVAL_STRING(*callable_name, name, 0);
} else {
- retval = zend_is_callable(var, syntax_only, NULL);
+ retval = zend_is_callable(var, syntax_only, NULL TSRMLS_CC);
}
RETURN_BOOL(retval);
diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c
index a6c9f08ec5..4a90d15a67 100644
--- a/ext/xmlrpc/xmlrpc-epi-php.c
+++ b/ext/xmlrpc/xmlrpc-epi-php.c
@@ -949,7 +949,7 @@ static void php_xmlrpc_introspection_callback(XMLRPC_SERVER server, void* data)
zend_hash_internal_pointer_reset(Z_ARRVAL_P(pData->server->introspection_map));
while(1) {
if(zend_hash_get_current_data(Z_ARRVAL_P(pData->server->introspection_map), (void**)&php_function) == SUCCESS) {
- if (zend_is_callable(*php_function, 0, &php_function_name)) {
+ if (zend_is_callable(*php_function, 0, &php_function_name TSRMLS_CC)) {
/* php func prototype: function string user_func($user_params) */
if (call_user_function(CG(function_table), NULL, *php_function, &retval, 1, callback_params TSRMLS_CC) == SUCCESS) {
XMLRPC_VALUE xData;