cvs: php4(PHP_4_3) /ext/pcre php_pcre.c
| From: | Moriyoshi Koizumi | Date: | Mon, 20 Jan 2003 16:46:35 +0000 |
| Subject: | cvs: php4(PHP_4_3) /ext/pcre php_pcre.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-18052@lists.php.net to get a copy of this message | ||
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(), ®ex, &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;
}