summaryrefslogtreecommitdiffstats
path: root/system/helpers/url_helper.php
diff options
context:
space:
mode:
authorRobin Sowell <robin.sowell@ellislab.com>2010-09-14 21:05:42 +0200
committerRobin Sowell <robin.sowell@ellislab.com>2010-09-14 21:05:42 +0200
commitd2167a01ec5bd134a4138b50d76487caa72245c6 (patch)
tree56164de6a974f96b8101b1d6540ba55c36a36073 /system/helpers/url_helper.php
parent59aa935e9214401822ade8f476546fbed5e222c8 (diff)
Fixed a bug in the URL Helper where prep_url() could cause a PHP error on PHP versions < 5.1.2.
Diffstat (limited to 'system/helpers/url_helper.php')
-rw-r--r--system/helpers/url_helper.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 7707d6854..dad761145 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -446,7 +446,9 @@ if ( ! function_exists('prep_url'))
return '';
}
- if ( ! parse_url($str, PHP_URL_SCHEME))
+ $url = parse_url($str);
+
+ if ( ! $url OR ! isset($url['scheme']))
{
$str = 'http://'.$str;
}