Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004494 [Quercus] major always 04-11-11 23:31 07-27-18 04:09
Reporter lionel_hutz12 View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 3.2.1
Summary 0004494: substr_count does not provide an accurate count when the search string is repeated in succession
Description substr_count skips the second instance of the search character(s) when they appear in succession in the searched string. For example, if you are searching for the number of times the character 'a' is present in the searched string and the search string contains "aa" it will only report 1 instance, instead of 2 times.
Additional Information Work around for this issue, may be to use:
preg_match_all('/a/', "aaaaa", $chunks);

which accurately prints out 5
Attached Files

- Relationships

- Notes
04-12-11 02:55

Issue fixed on CC branch.
Patch proposal: [^]
07-27-18 04:09

Thanks for posting a work around, this is still a bug in Resin Pro 4.0.55, was driving me insane.

- Issue History
Date Modified Username Field Change
04-11-11 23:31 lionel_hutz12 New Issue
04-12-11 02:55 kdecherf Note Added: 0005189
07-27-18 04:09 Glynn Note Added: 0006844

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
32 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker