From 0924d723b68f0a2479392bf1f9999cb5afbddf4d Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 30 Jun 2009 23:21:50 +0000 Subject: [PATCH] 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 --- core/control/HTTPRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/control/HTTPRequest.php b/core/control/HTTPRequest.php index 593b03849..a5e234955 100644 --- a/core/control/HTTPRequest.php +++ b/core/control/HTTPRequest.php @@ -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);