commit | d2167a01ec5bd134a4138b50d76487caa72245c6 | [log] [tgz] |
---|---|---|
author | Robin Sowell <robin.sowell@ellislab.com> | Tue Sep 14 15:05:42 2010 -0400 |
committer | Robin Sowell <robin.sowell@ellislab.com> | Tue Sep 14 15:05:42 2010 -0400 |
tree | 56164de6a974f96b8101b1d6540ba55c36a36073 | |
parent | 59aa935e9214401822ade8f476546fbed5e222c8 [diff] [blame] |
Fixed a bug in the URL Helper where prep_url() could cause a PHP error on PHP versions < 5.1.2.
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 7707d68..dad7611 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php
@@ -446,7 +446,9 @@ return ''; } - if ( ! parse_url($str, PHP_URL_SCHEME)) + $url = parse_url($str); + + if ( ! $url OR ! isset($url['scheme'])) { $str = 'http://'.$str; }