cvs: php4 /ext/pcre php_pcre.c
| From: | Moriyoshi Koizumi | Date: | Mon, 20 Jan 2003 16:45:22 +0000 |
| Subject: | cvs: php4 /ext/pcre php_pcre.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-18051@lists.php.net to get a copy of this message | ||
moriyoshi Mon Jan 20 11:45:22 2003 EDT
Modified files:
/php4/ext/pcre php_pcre.c
Log:
Fixed bug #21758
Index: php4/ext/pcre/php_pcre.c
diff -u php4/ext/pcre/php_pcre.c:1.136 php4/ext/pcre/php_pcre.c:1.137
--- php4/ext/pcre/php_pcre.c:1.136 Sat Jan 18 19:45:43 2003
+++ php4/ext/pcre/php_pcre.c Mon Jan 20 11:45:21 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.c,v 1.136 2003/01/19 00:45:43 iliaa Exp $ */
+/* $Id: php_pcre.c,v 1.137 2003/01/20 16:45:21 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;
}