summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--ext/standard/string.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 8ef2841ba8..67dfb464f9 100644
--- 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:
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 60288a7ce3..922d4fceaf 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -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;