diff options
author | Dmitry Stogov <dmitry@php.net> | 2008-07-14 09:49:03 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2008-07-14 09:49:03 +0000 |
commit | d5ef2f466cb112fd977a71419fa4b67d0aa0a2ac (patch) | |
tree | 2f61549b96e8db664a1467f36ce11772600c86a9 /ext/pcre/php_pcre.c | |
parent | d23342397c14a6efb3e0b1ea20928f81ccc48657 (diff) | |
download | php-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.c | 2 |
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)) { |