From 639e4e1afac8c79d28e1a4c3df48fc060b35b68e Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 25 Feb 2014 16:03:34 +0400 Subject: Changes zend_is_callable() to use zend_string* instead of char* --- ext/pcre/php_pcre.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/pcre/php_pcre.c') 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); -- cgit v1.2.1