moriyoshi               Mon Jan 20 11:46:35 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php4/ext/pcre      php_pcre.c 
  Log:
  MFH: fixed bug #21758
  
  
Index: php4/ext/pcre/php_pcre.c
diff -u php4/ext/pcre/php_pcre.c:1.132.2.3 php4/ext/pcre/php_pcre.c:1.132.2.4
--- php4/ext/pcre/php_pcre.c:1.132.2.3  Sat Jan 18 15:49:02 2003
+++ php4/ext/pcre/php_pcre.c    Mon Jan 20 11:46:34 2003
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_pcre.c,v 1.132.2.3 2003/01/18 20:49:02 iliaa Exp $ */
+/* $Id: php_pcre.c,v 1.132.2.4 2003/01/20 16:46:34 moriyoshi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1044,7 +1044,7 @@
                zend_get_parameters_ex(ZEND_NUM_ARGS(), &regex, &replace, &subject, 
&limit) == FAILURE) {
                WRONG_PARAM_COUNT;
        }
-       if (Z_TYPE_PP(replace) == IS_ARRAY && Z_TYPE_PP(regex) != IS_ARRAY) {
+       if (!is_callable_replace && Z_TYPE_PP(replace) == IS_ARRAY && Z_TYPE_PP(regex) 
+!= IS_ARRAY) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parameter mismatch, 
pattern is a string while replacement in an array.");
                RETURN_FALSE;
        }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to