From: Andrei Zmievski Date: Mon, 2 Oct 2006 20:07:14 +0000 (+0000) Subject: Use php_error_docref() instead. X-Git-Tag: php-5.2.0RC5~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c96544b7d5eb1bce986010418f98990bc24b83b;p=php Use php_error_docref() instead. --- 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;