BUGFIX #3937: Fixed substr_count in HTTPRequest to be mbstring compatible

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80655 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-06-30 23:21:50 +00:00
parent 9fdf9e1dc8
commit 0924d723b6

View File

@ -301,7 +301,7 @@ class HTTPRequest extends Object implements ArrayAccess {
// Check for the '//' marker that represents the "shifting point"
$doubleSlashPoint = strpos($pattern, '//');
if($doubleSlashPoint !== false) {
$shiftCount = substr_count($pattern, '/', 0, $doubleSlashPoint) + 1;
$shiftCount = substr_count(substr($pattern,0,$doubleSlashPoint), '/') + 1;
$pattern = str_replace('//', '/', $pattern);
$patternParts = explode('/', $pattern);