summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-02-25 16:03:34 +0400
committerDmitry Stogov <dmitry@zend.com>2014-02-25 16:03:34 +0400
commit639e4e1afac8c79d28e1a4c3df48fc060b35b68e (patch)
tree08c72669ebe528443940264e02618b9897eee0c1 /ext/pcre/php_pcre.c
parentb965647e44c4574ba4c22bfc92b5b7f587451c9d (diff)
downloadphp-git-639e4e1afac8c79d28e1a4c3df48fc060b35b68e.tar.gz
Changes zend_is_callable() to use zend_string* instead of char*
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index d3bdf87bca..c27f3f7eb1 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -1320,7 +1320,7 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, int is_callable_repl
long limit = -1;
zend_string *string_key;
ulong num_key;
- char *callback_name;
+ zend_string *callback_name;
int replace_count=0, old_replace_count;
/* Get function parameters and do error-checking. */
@@ -1339,12 +1339,12 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, int is_callable_repl
}
if (is_callable_replace) {
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);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Requires argument 2, '%s', to be a valid callback", callback_name->val);
+ STR_RELEASE(callback_name);
ZVAL_DUP(return_value, subject);
return;
}
- efree(callback_name);
+ STR_RELEASE(callback_name);
}
SEPARATE_ZVAL(regex);