]> granicus.if.org Git - php/commitdiff
- Fixed bug #47102 (strripos issues unexpected warning with UNICODE haystack) (Notice...
authorFelipe Pena <felipe@php.net>
Sat, 17 Jan 2009 20:36:22 +0000 (20:36 +0000)
committerFelipe Pena <felipe@php.net>
Sat, 17 Jan 2009 20:36:22 +0000 (20:36 +0000)
ext/standard/string.c

index c3f522ae9ca892003c141283939963bdfcdb7470..d85e8ada23a37e2b8e9db1d327dec4b3b5954d42 100644 (file)
@@ -2913,7 +2913,7 @@ PHP_FUNCTION(strripos)
        if (haystack_type == IS_UNICODE) {
                if (offset >= 0) {
                        U16_FWD_N(haystack.u, cu_offset, haystack_len, offset);
-                       if (cu_offset > haystack_len - needle_len) {
+                       if (cu_offset > haystack_len) {
                                php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Offset is greater than the length of haystack string");
                                RETURN_FALSE;
                        }