From: Moriyoshi Koizumi Date: Sat, 14 Feb 2009 06:59:55 +0000 (+0000) Subject: - MFH: These should be E_WARNING for consistency with strpos() X-Git-Tag: RELEASE_1_3_5~128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a9a83e7bcb2d4716c34a4755a4a09aa8a2a98a5;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 b8d822ce45..ca13c39608 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -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;