BUGFIX: Ticket #2327 - Merged patch fixing regex problem in Director::protocolAndHost()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@53194 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-04-22 03:30:16 +00:00
parent 130ead34cd
commit a12cf06cc8

View File

@ -269,7 +269,7 @@ class Director {
*/ */
static function protocolAndHost() { static function protocolAndHost() {
if(self::$alternateBaseURL) { if(self::$alternateBaseURL) {
if(preg_match('/^(http[^:]*:\/\/[^/]+)\//1', self::$alternateBaseURL, $matches)) { if(preg_match('/^(http[^:]*:\/\/[^\/]+)\//', self::$alternateBaseURL, $matches)) {
return $matches[1]; return $matches[1];
} }
} }