]> 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 07:00:24 +0000 (07:00 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 14 Feb 2009 07:00:24 +0000 (07:00 +0000)
ext/standard/string.c

index e1062afac341a8daca12de4dee7589993c6778dd..0311caa2d59a940767cfce93de6ae615d827c11b 100644 (file)
@@ -1949,14 +1949,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) {
-                       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;
                }
 
@@ -2025,7 +2025,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;
@@ -2033,7 +2033,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;
@@ -2058,7 +2058,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;
@@ -2067,7 +2067,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;