From: Moriyoshi Koizumi Date: Sat, 14 Feb 2009 07:00:24 +0000 (+0000) Subject: - MFH: these should be E_WARNING for consistency with strpos() X-Git-Tag: php-5.2.9RC3~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17eb9361e16198b85a541a2933e3455bae0c1de0;p=php - MFH: these should be E_WARNING for consistency with strpos() --- diff --git a/ext/standard/string.c b/ext/standard/string.c index e1062afac3..0311caa2d5 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -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;