Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/UrlHelper.php')
-rw-r--r--core/UrlHelper.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/UrlHelper.php b/core/UrlHelper.php
index b1dfa46d12..5efba99996 100644
--- a/core/UrlHelper.php
+++ b/core/UrlHelper.php
@@ -101,8 +101,8 @@ class UrlHelper
*/
public static function isLookLikeUrl($url)
{
- return preg_match('~^(ftp|news|http|https)?://(.*)$~D', $url, $matches) !== 0
- && strlen($matches[2]) > 0;
+ return preg_match('~^((ftp|news|http|https)?:)?//(.*)$~D', $url, $matches) !== 0
+ && strlen($matches[3]) > 0;
}
/**