diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index d1e5d4ebd..ab6ef72c9 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -775,7 +775,7 @@ class Router { } } else { if ( - (strpos($url, '://') || + (strpos($url, '://') !== false || (strpos($url, 'javascript:') === 0) || (strpos($url, 'mailto:') === 0)) || (!strncmp($url, '#', 1)) diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php index 92931ce1c..6a0cbc291 100644 --- a/lib/Cake/Test/Case/Routing/RouterTest.php +++ b/lib/Cake/Test/Case/Routing/RouterTest.php @@ -2420,6 +2420,9 @@ class RouterTest extends CakeTestCase { $url = 'svn+ssh://example.com'; $this->assertEqual($url, Router::url($url)); + + $url = '://example.com'; + $this->assertEqual($url, Router::url($url)); } /**