]> granicus.if.org Git - php/commitdiff
- MFH: These should be E_WARNING for consistency with strpos()
authorMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 14 Feb 2009 06:59:55 +0000 (06:59 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 14 Feb 2009 06:59:55 +0000 (06:59 +0000)
ext/standard/string.c

index b8d822ce45cdecf0e29814e48493b520604a543f..ca13c3960860097d37f794a420de77c893d08ddc 100644 (file)
@@ -1833,14 +1833,14 @@ PHP_FUNCTION(strrpos)
 
        if (offset >= 0) {
                if (offset > haystack_len) {
-                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string");
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset is greater than the length of haystack string");
                        RETURN_FALSE;
                }
                p = haystack + offset;
                e = haystack + haystack_len - needle_len;
        } else {
                if (-offset > haystack_len || offset < -INT_MAX) {
-                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string");
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset is greater than the length of haystack string");
                        RETURN_FALSE;
                }
 
@@ -1909,7 +1909,7 @@ PHP_FUNCTION(strripos)
                   Can also avoid tolower emallocs */
                if (offset >= 0) {
                        if (offset > haystack_len) {
-                               php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string");
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset is greater than the length of haystack string");
                                RETURN_FALSE;
                        }
                        p = haystack + offset;
@@ -1917,7 +1917,7 @@ PHP_FUNCTION(strripos)
                } else {
                        p = haystack;
                        if (-offset > haystack_len || offset < -INT_MAX) {
-                               php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string");
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset is greater than the length of haystack string");
                                RETURN_FALSE;
                        }
                        e = haystack + haystack_len + offset;
@@ -1942,7 +1942,7 @@ PHP_FUNCTION(strripos)
                if (offset > haystack_len) {
                        efree(needle_dup);
                        efree(haystack_dup);
-                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string");
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset is greater than the length of haystack string");
                        RETURN_FALSE;
                }
                p = haystack_dup + offset;
@@ -1951,7 +1951,7 @@ PHP_FUNCTION(strripos)
                if (-offset > haystack_len || offset < -INT_MAX) {
                        efree(needle_dup);
                        efree(haystack_dup);
-                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string");
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset is greater than the length of haystack string");
                        RETURN_FALSE;
                }
                p = haystack_dup;