moriyoshi               Sat Feb 14 06:59:36 2009 UTC

  Modified files:              
    /php-src/ext/standard       string.c 
  Log:
  - These should be E_WARNING for consistency with strpos()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.691&r2=1.692&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.691 php-src/ext/standard/string.c:1.692
--- php-src/ext/standard/string.c:1.691 Sat Jan 17 20:36:22 2009
+++ php-src/ext/standard/string.c       Sat Feb 14 06:59:36 2009
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.691 2009/01/17 20:36:22 felipe Exp $ */
+/* $Id: string.c,v 1.692 2009/02/14 06:59:36 moriyoshi Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -2784,7 +2784,7 @@
                if (offset >= 0) {
                        U16_FWD_N(haystack.u, cu_offset, haystack_len, offset);
                        if (cu_offset > haystack_len - needle_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;
                        }
                        u_p = haystack.u + cu_offset;
@@ -2792,13 +2792,13 @@
                } else {
                        u_p = haystack.u;
                        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;
                        } else {
                                cu_offset = haystack_len;
                                U16_BACK_N(haystack.u, 0, cu_offset, -offset);
                                if (cu_offset == 0) {
-                                       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;
                                }
                                if (needle_len > haystack_len - cu_offset) {
@@ -2822,14 +2822,14 @@
        } else {
                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.s + offset;
                        e = haystack.s + 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;
                        }
 
@@ -2914,7 +2914,7 @@
                if (offset >= 0) {
                        U16_FWD_N(haystack.u, cu_offset, haystack_len, offset);
                        if (cu_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;
                        }
                        u_p = haystack.u + cu_offset;
@@ -2922,13 +2922,13 @@
                } else {
                        u_p = haystack.u;
                        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;
                        } else {
                                cu_offset = haystack_len;
                                U16_BACK_N(haystack.u, 0, cu_offset, -offset);
                                if (cu_offset == 0) {
-                                       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;
                                }
                                if (needle_len > haystack_len - cu_offset) {
@@ -2955,7 +2955,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.s + offset;
@@ -2963,7 +2963,7 @@
                        } else {
                                p = haystack.s;
                                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;
                                } else {
                                        e = haystack.s + haystack_len + offset;
@@ -2989,7 +2989,7 @@
                        if (offset > haystack_len) {
                                efree(haystack_dup);
                                efree(needle_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;
@@ -2998,7 +2998,7 @@
                        if (-offset > haystack_len || offset < -INT_MAX) {
                                efree(haystack_dup);
                                efree(needle_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