]> granicus.if.org Git - php/commitdiff
Fixed bug #75781 (substr_count incorrect result)
authorXinchen Hui <laruence@gmail.com>
Tue, 9 Jan 2018 08:20:19 +0000 (16:20 +0800)
committerXinchen Hui <laruence@gmail.com>
Tue, 9 Jan 2018 08:21:02 +0000 (16:21 +0800)
NEWS
ext/standard/string.c

diff --git a/NEWS b/NEWS
index 8ef2841ba86e49250fb3059ff977468034e0ebb3..67dfb464f96a300af84e1c651ea9ace599be6ef6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,9 @@ PHP                                                                        NEWS
   . Fixed bug #73209 (RecursiveArrayIterator does not iterate object
     properties). (Nikita)
 
+- Standard:
+   . Fixed bug #75781 (substr_count incorrect result). (Laruence)
+
 04 Jan 2018, PHP 7.1.13
 
 - Core:
index 60288a7ce35eece733da7d2ebef764d6683e66ec..922d4fceaff5bed12a8417f8881455a27b1a2d7a 100644 (file)
@@ -5192,7 +5192,7 @@ PHP_FUNCTION(substr_count)
        char *haystack, *needle;
        zend_long offset = 0, length = 0;
        int ac = ZEND_NUM_ARGS();
-       int count = 0;
+       zend_long count = 0;
        size_t haystack_len, needle_len;
        char *p, *endp, cmp;