From: Felipe Pena Date: Wed, 9 Apr 2008 13:47:35 +0000 (+0000) Subject: Fixed bug #44678 (spliti error message includes wrong function name) X-Git-Tag: php-5.2.6RC5~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52127174e20c656eb60ab3f86deb35670b81abcb;p=php Fixed bug #44678 (spliti error message includes wrong function name) --- diff --git a/ext/standard/reg.c b/ext/standard/reg.c index 6eb775ed0d..8c146f0559 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -564,7 +564,13 @@ static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase) } else if (subs[0].rm_so == 0 && subs[0].rm_eo == 0) { /* No more matches */ regfree(&re); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Regular Expression to split()"); + + if (icase) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Regular Expression to spliti()"); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid Regular Expression to split()"); + } + zend_hash_destroy(Z_ARRVAL_P(return_value)); efree(Z_ARRVAL_P(return_value)); RETURN_FALSE;