]> granicus.if.org Git - php/commitdiff
Fixed bug #64432 (more empty delimiter warning in strX methods)
authorXinchen Hui <laruence@php.net>
Thu, 21 Mar 2013 03:14:10 +0000 (11:14 +0800)
committerXinchen Hui <laruence@php.net>
Thu, 21 Mar 2013 03:14:10 +0000 (11:14 +0800)
NEWS
ext/standard/string.c
ext/standard/tests/strings/stristr_error.phpt
ext/standard/tests/strings/strstr.phpt

diff --git a/NEWS b/NEWS
index 4e4557f8806183b25ff37f9f9ea7caa60fe9a5e4..d60fcb3517daded105d9cf077974c464f5ebba97 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2013, PHP 5.4.14
 - Core
+  . Fixed bug #64432 (more empty delimiter warning in strX methods). (Laruence)
   . Fixed bug #64417 (ArrayAccess::&offsetGet() in a trait causes fatal error).
     (Dmitry)
   . Fixed bug #64370 (microtime(true) less than $_SERVER['REQUEST_TIME_FLOAT']).
index 42bf198175c2f6c99a97d8c1bf357913e39df12e..77e0dff4c33646f3a6c615af1b47d87753d219b2 100644 (file)
@@ -1715,7 +1715,7 @@ PHP_FUNCTION(stristr)
        if (Z_TYPE_P(needle) == IS_STRING) {
                char *orig_needle;
                if (!Z_STRLEN_P(needle)) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter");
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty needle");
                        efree(haystack_dup);
                        RETURN_FALSE;
                }
@@ -1765,7 +1765,7 @@ PHP_FUNCTION(strstr)
 
        if (Z_TYPE_P(needle) == IS_STRING) {
                if (!Z_STRLEN_P(needle)) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter");
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty needle");
                        RETURN_FALSE;
                }
 
index 831d93f4ec32bdd6e6729fe726701543d504bba4..2da35de73588beeb926b74e268bb1772fb32d3bb 100644 (file)
@@ -50,11 +50,11 @@ NULL
 
 -- Testing stristr() function with empty haystack --
 
-Warning: stristr(): Empty delimiter in %s on line %d
+Warning: stristr(): Empty needle in %s on line %d
 bool(false)
 
 -- Testing stristr() function with empty needle --
 
-Warning: stristr(): Empty delimiter in %s on line %d
+Warning: stristr(): Empty needle in %s on line %d
 bool(false)
 ===DONE===
index 1c8d753e6587ab472b94b839a8cba6e02a0f4430..b135258f882e7daa4f120c8750a74153dc61a3a2 100644 (file)
Binary files a/ext/standard/tests/strings/strstr.phpt and b/ext/standard/tests/strings/strstr.phpt differ