]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #44678 (spliti error message includes wrong function name)
authorFelipe Pena <felipe@php.net>
Wed, 9 Apr 2008 13:52:53 +0000 (13:52 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 9 Apr 2008 13:52:53 +0000 (13:52 +0000)
ext/ereg/ereg.c

index 7185d66d085210e016ea07d72e310702ee1e419a..d3d49ec08bba8238cfdba4bcdc304defd8d58d07 100644 (file)
@@ -644,7 +644,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;