From 5c96544b7d5eb1bce986010418f98990bc24b83b Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Mon, 2 Oct 2006 20:07:14 +0000 Subject: [PATCH] Use php_error_docref() instead. --- ext/standard/string.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index e2e10b005a..ecd9eea4e7 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1768,14 +1768,14 @@ PHP_FUNCTION(strrpos) if (offset >= 0) { if (offset > haystack_len) { - php_error(E_NOTICE, "Offset is greater than the length of haystack string"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "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(E_NOTICE, "Offset is greater than the length of haystack string"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string"); RETURN_FALSE; } @@ -1844,7 +1844,7 @@ PHP_FUNCTION(strripos) Can also avoid tolower emallocs */ if (offset >= 0) { if (offset > haystack_len) { - php_error(E_NOTICE, "Offset is greater than the length of haystack string"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string"); RETURN_FALSE; } p = haystack + offset; @@ -1852,7 +1852,7 @@ PHP_FUNCTION(strripos) } else { p = haystack; if (-offset > haystack_len) { - php_error(E_NOTICE, "Offset is greater than the length of haystack string"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string"); RETURN_FALSE; } else { e = haystack + haystack_len + offset; @@ -1876,14 +1876,14 @@ PHP_FUNCTION(strripos) if (offset >= 0) { if (offset > haystack_len) { - php_error(E_NOTICE, "Offset is greater than the length of haystack string"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string"); RETURN_FALSE; } p = haystack_dup + offset; e = haystack_dup + haystack_len - needle_len; } else { if (-offset > haystack_len) { - php_error(E_NOTICE, "Offset is greater than the length of haystack string"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string"); RETURN_FALSE; } p = haystack_dup; -- 2.50.1