summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2008-07-14 09:49:03 +0000
committerDmitry Stogov <dmitry@php.net>2008-07-14 09:49:03 +0000
commitd5ef2f466cb112fd977a71419fa4b67d0aa0a2ac (patch)
tree2f61549b96e8db664a1467f36ce11772600c86a9 /ext/pcre/php_pcre.c
parentd23342397c14a6efb3e0b1ea20928f81ccc48657 (diff)
downloadphp-git-d5ef2f466cb112fd977a71419fa4b67d0aa0a2ac.tar.gz
Added support for lambda functions and closures
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index af67b284d1..0192ebfafa 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -1312,7 +1312,7 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callabl
}
SEPARATE_ZVAL(replace);
- if (Z_TYPE_PP(replace) != IS_ARRAY)
+ 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)) {