moriyoshi               Sat Feb 14 06:59:56 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /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.69.2.41&r2=1.445.2.14.2.69.2.42&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.41 
php-src/ext/standard/string.c:1.445.2.14.2.69.2.42
--- php-src/ext/standard/string.c:1.445.2.14.2.69.2.41  Fri Jan 30 00:16:27 2009
+++ php-src/ext/standard/string.c       Sat Feb 14 06:59:55 2009
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.445.2.14.2.69.2.41 2009/01/30 00:16:27 iliaa Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.69.2.42 2009/02/14 06:59:55 moriyoshi Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -1833,14 +1833,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 || 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 @@
                   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 @@
                } 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 @@
                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 @@
                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