moriyoshi               Sat Feb 14 07:00:24 2009 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/standard       string.c 
  Log:
  - MFH: these should be E_WARNING for consistency with strpos()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.80&r2=1.445.2.14.2.81&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.80 
php-src/ext/standard/string.c:1.445.2.14.2.81
--- php-src/ext/standard/string.c:1.445.2.14.2.80       Fri Jan 30 00:17:05 2009
+++ php-src/ext/standard/string.c       Sat Feb 14 07:00:24 2009
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.445.2.14.2.80 2009/01/30 00:17:05 iliaa Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.81 2009/02/14 07:00:24 moriyoshi Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -1949,14 +1949,14 @@
 
        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 @@
                   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 @@
                } 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 @@
                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 @@
                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;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to