diff options
-rw-r--r-- | system/helpers/url_helper.php | 4 | ||||
-rw-r--r-- | user_guide/changelog.html | 1 |
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 < 5.1.2.</li> </ul> <h2>Version 1.7.2</h2> |