From 2b9b11d3af416c3619cc7527bf192c5f6df46124 Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Thu, 24 Feb 2000 14:37:05 +0000 Subject: [PATCH] Fix bug #3599. --- TODO | 2 -- ext/pcre/php_pcre.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/TODO b/TODO index 4abd32b1a4..084e156f70 100644 --- a/TODO +++ b/TODO @@ -5,8 +5,6 @@ Zend ---- * allow foreach ($array as $k => &$val) syntax. right now we can not traverse an array without copying each element. - * create typedefs for all kinds of callback functions - this would make - casting easier. eg: zend_hash_apply(someht,(zend_apply_f) bla); global ------ diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 1b018f259b..55cc0da7e5 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -328,7 +328,7 @@ static void _pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* Get function parameters and do error-checking. */ switch(ARG_COUNT(ht)) { case 2: - if (zend_get_parameters_ex(2, ®ex, &subject) == FAILURE) { + if (global || zend_get_parameters_ex(2, ®ex, &subject) == FAILURE) { WRONG_PARAM_COUNT; } break; -- 2.50.1