summaryrefslogtreecommitdiffstats
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
parent59aa935e9214401822ade8f476546fbed5e222c8 (diff)
Fixed a bug in the URL Helper where prep_url() could cause a PHP error on PHP versions < 5.1.2.
-rw-r--r--system/helpers/url_helper.php4
-rw-r--r--user_guide/changelog.html1
2 files changed, 4 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;
}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 5740f7397..9bb4a4e81 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -184,6 +184,7 @@ Hg Tag: </p>
<li>Fixed a bug where getimagesize() was being needlessly checked on non-image files in is_allowed_type().</li>
<li>Fixed a bug in the Encryption library where an empty key was not triggering an error.</li>
<li>Fixed a bug in the Email library where CC and BCC recipients were not reset when using the clear() method (#109).</li>
+ <li>Fixed a bug in the URL Helper where prep_url() could cause a PHP error on PHP versions &lt; 5.1.2.</li>
</ul>
<h2>Version 1.7.2</h2>